@next-core/cook 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cook.js +3 -3
- package/dist/cjs/cook.js.map +1 -1
- package/dist/esm/cook.js +3 -3
- package/dist/esm/cook.js.map +1 -1
- package/package.json +4 -4
package/dist/cjs/cook.js
CHANGED
|
@@ -173,7 +173,7 @@ function cook(rootAst, codeSource, {
|
|
|
173
173
|
case "||":
|
|
174
174
|
return (0, _ExecutionContext.NormalCompletion)(leftValue || (0, _contextFree.GetValue)(yield* Evaluate(node.right)));
|
|
175
175
|
case "??":
|
|
176
|
-
return (0, _ExecutionContext.NormalCompletion)(leftValue
|
|
176
|
+
return (0, _ExecutionContext.NormalCompletion)(leftValue !== null && leftValue !== void 0 ? leftValue : (0, _contextFree.GetValue)(yield* Evaluate(node.right)));
|
|
177
177
|
// istanbul ignore next
|
|
178
178
|
default:
|
|
179
179
|
throw new SyntaxError(
|
|
@@ -1325,7 +1325,7 @@ function cook(rootAst, codeSource, {
|
|
|
1325
1325
|
return closure;
|
|
1326
1326
|
} else {
|
|
1327
1327
|
const closure = OrdinaryFunctionCreate(functionExpression, scope, true, false);
|
|
1328
|
-
SetFunctionName(closure, name
|
|
1328
|
+
SetFunctionName(closure, name !== null && name !== void 0 ? name : "");
|
|
1329
1329
|
return closure;
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
@@ -1334,7 +1334,7 @@ function cook(rootAst, codeSource, {
|
|
|
1334
1334
|
function InstantiateArrowFunctionExpression(arrowFunction, name) {
|
|
1335
1335
|
const scope = getRunningContext().LexicalEnvironment;
|
|
1336
1336
|
const closure = OrdinaryFunctionCreate(arrowFunction, scope, false, true);
|
|
1337
|
-
SetFunctionName(closure, name
|
|
1337
|
+
SetFunctionName(closure, name !== null && name !== void 0 ? name : "");
|
|
1338
1338
|
return closure;
|
|
1339
1339
|
}
|
|
1340
1340
|
function SetFunctionName(F, name) {
|