Bug 1686218 - top level await should throw the current module error, not the cycle root error; r=jonco

Differential Revision: https://phabricator.services.mozilla.com/D101465
This commit is contained in:
yulia 2021-02-25 11:30:55 +00:00
parent 50efd46fb1
commit b3f97ee239

View File

@ -717,7 +717,7 @@ function InnerModuleEvaluation(module, stack, index)
assert(requiredModule.status >= MODULE_STATUS_EVALUATED,
`Bad module status in InnerModuleEvaluation: ${requiredModule.status}`);
if (requiredModule.evaluationError) {
throw GetModuleEvaluationError(module);
throw GetModuleEvaluationError(requiredModule);
}
}
}