Skip to content

Commit

Permalink
fixup! default to freeze,isFrozen if absent
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jan 10, 2025
1 parent 75aa391 commit a46e86d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/marshal/src/encodeToCapData.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ const {
is,
entries,
fromEntries,
freeze,
// @ts-expect-error TS doesn't see this on ObjectConstructor
suppressTrapping,
suppressTrapping = freeze,
} = Object;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/pass-style/src/remotable.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const {
getOwnPropertyDescriptors,
isFrozen,
// @ts-expect-error TS does not yet have `isNonTrapping` on ObjectConstructor
isNonTrapping,
isNonTrapping = isFrozen,
} = Object;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/pass-style/src/safe-promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
getOwnPropertyDescriptor,
isFrozen,
// @ts-expect-error TS does not yet have `isNonTrapping` on ObjectConstructor
isNonTrapping,
isNonTrapping = isFrozen,
} = Object;
const { ownKeys } = Reflect;
const { toStringTag } = Symbol;
Expand Down
4 changes: 2 additions & 2 deletions packages/ses/src/commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ export const {
fromEntries,
// https://github.com/endojs/endo/pull/2673
// @ts-expect-error TS does not yet have this on ObjectConstructor.
isNonTrapping,
isNonTrapping = isFrozen,
// @ts-expect-error TS does not yet have this on ObjectConstructor.
suppressTrapping,
suppressTrapping = freeze,
} = Object;

export const {
Expand Down

0 comments on commit a46e86d

Please sign in to comment.