Skip to content

Commit

Permalink
fixup! reverting the harden non-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Feb 12, 2025
1 parent 9235d84 commit 83a04ac
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/ses/src/make-hardener.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,10 @@ export const makeHardener = () => {
// therefore this is a valid candidate.
// Throws if this fails (strict mode).
// Also throws if the object is an ArrayBuffer or any TypedArray.
try {
if (isTypedArray(obj)) {
freezeTypedArray(obj);
} else {
freeze(obj);
} catch (err) {
if (isTypedArray(obj)) {
freezeTypedArray(obj);
} else {
throw err;
}
}

// we rely upon certain commitments of Object.freeze and proxies here
Expand Down

0 comments on commit 83a04ac

Please sign in to comment.