@poe-platform/safe-js 0.1.484 → 0.1.486
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/safe-js/chunks/{chunk-DFDH37RE.js → chunk-6I6LKRVY.js} +7 -2
- package/dist/safe-js/chunks/{chunk-DFDH37RE.js.map → chunk-6I6LKRVY.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-MJOAIXVY.js → chunk-DKWCAJSP.js} +2 -2
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/package.json +2 -2
- /package/dist/safe-js/chunks/{chunk-MJOAIXVY.js.map → chunk-DKWCAJSP.js.map} +0 -0
|
@@ -26990,6 +26990,10 @@ async function evaluateUnaryExpression(node, context) {
|
|
|
26990
26990
|
}
|
|
26991
26991
|
async function evaluateDeleteExpression(node, context) {
|
|
26992
26992
|
if (node.argument.type !== "MemberExpression") {
|
|
26993
|
+
if (node.argument.type !== "Identifier") {
|
|
26994
|
+
const argument = await evaluateNode(node.argument, context);
|
|
26995
|
+
return argument.kind === "normal" ? { kind: "normal", hasValue: true, value: true } : argument;
|
|
26996
|
+
}
|
|
26993
26997
|
throw createError(
|
|
26994
26998
|
"UNSUPPORTED_NODE",
|
|
26995
26999
|
node,
|
|
@@ -27009,7 +27013,7 @@ async function evaluateDeleteExpression(node, context) {
|
|
|
27009
27013
|
}
|
|
27010
27014
|
throw new TypeError("Cannot delete properties of null or undefined.");
|
|
27011
27015
|
}
|
|
27012
|
-
if (!isIndexableSandboxValue(member.object) && !isSandboxPromise(member.object) && !isSandboxRegex(member.object) && !isSandboxMap(member.object) && !isSandboxSet(member.object)) {
|
|
27016
|
+
if (typeof member.object === "object" && !isIndexableSandboxValue(member.object) && !isSandboxPromise(member.object) && !isSandboxRegex(member.object) && !isSandboxMap(member.object) && !isSandboxSet(member.object)) {
|
|
27013
27017
|
throw new TypeError("Unary operator 'delete' requires a sandbox object property.");
|
|
27014
27018
|
}
|
|
27015
27019
|
const property = await toPropertyKey(member.property, context.budget, createCoercionContext(context));
|
|
@@ -28049,6 +28053,7 @@ function setSuperProperty(base, receiver, key, value, context) {
|
|
|
28049
28053
|
return setSandboxProperty(receiver, key, value, budget, false);
|
|
28050
28054
|
}
|
|
28051
28055
|
function deleteSandboxProperty(target, property) {
|
|
28056
|
+
if (target !== null && target !== void 0 && typeof target !== "object") target = Object(target);
|
|
28052
28057
|
if (isGuestHostObject(target)) return deleteHostObjectMember(target, String(property));
|
|
28053
28058
|
if (isSandboxClosure(target)) target = materializeFunctionProperties(target);
|
|
28054
28059
|
if (isSandboxRegex(target)) target = getRegexProperties(target);
|
|
@@ -57268,4 +57273,4 @@ authorization of the copyright holder.
|
|
|
57268
57273
|
SPDX-License-Identifier: Unicode-3.0
|
|
57269
57274
|
|
|
57270
57275
|
*/
|
|
57271
|
-
//# sourceMappingURL=chunk-
|
|
57276
|
+
//# sourceMappingURL=chunk-6I6LKRVY.js.map
|