@poe-platform/safe-js 0.1.485 → 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.
@@ -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,
@@ -27000,10 +27004,6 @@ async function evaluateDeleteExpression(node, context) {
27000
27004
  if (member.kind === "resolved" && member.superReceiver !== void 0)
27001
27005
  throw new ReferenceError("Cannot delete a super property.");
27002
27006
  if (member.kind === "nullish" || member.object === null || member.object === void 0) {
27003
- if (node.argument.type !== "Identifier") {
27004
- const argument = await evaluateNode(node.argument, context);
27005
- return argument.kind === "normal" ? { kind: "normal", hasValue: true, value: true } : argument;
27006
- }
27007
27007
  if (member.kind === "nullish") {
27008
27008
  return {
27009
27009
  kind: "normal",
@@ -27013,7 +27013,7 @@ async function evaluateDeleteExpression(node, context) {
27013
27013
  }
27014
27014
  throw new TypeError("Cannot delete properties of null or undefined.");
27015
27015
  }
27016
- 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)) {
27017
27017
  throw new TypeError("Unary operator 'delete' requires a sandbox object property.");
27018
27018
  }
27019
27019
  const property = await toPropertyKey(member.property, context.budget, createCoercionContext(context));
@@ -28053,6 +28053,7 @@ function setSuperProperty(base, receiver, key, value, context) {
28053
28053
  return setSandboxProperty(receiver, key, value, budget, false);
28054
28054
  }
28055
28055
  function deleteSandboxProperty(target, property) {
28056
+ if (target !== null && target !== void 0 && typeof target !== "object") target = Object(target);
28056
28057
  if (isGuestHostObject(target)) return deleteHostObjectMember(target, String(property));
28057
28058
  if (isSandboxClosure(target)) target = materializeFunctionProperties(target);
28058
28059
  if (isSandboxRegex(target)) target = getRegexProperties(target);
@@ -57272,4 +57273,4 @@ authorization of the copyright holder.
57272
57273
  SPDX-License-Identifier: Unicode-3.0
57273
57274
 
57274
57275
  */
57275
- //# sourceMappingURL=chunk-KBXIWZWM.js.map
57276
+ //# sourceMappingURL=chunk-6I6LKRVY.js.map