Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix failing test
Browse files Browse the repository at this point in the history
dygabo committed Jun 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b02e556 commit 27008ef
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/internal/bootstrap/web/exposed-window-or-worker.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

const {
ObjectDefineProperty,
ObjectGetOwnPropertyDescriptor,
globalThis,
} = primordials;

@@ -115,10 +114,13 @@ if (internalBinding('config').hasOpenSSL) {
['Crypto', 'CryptoKey', 'SubtleCrypto'],
);
} else {
ObjectDefineProperty(globalThis, 'crypto',
{ __proto__: null, ...ObjectGetOwnPropertyDescriptor({
get crypto() {
throw new ERR_NO_CRYPTO();
},
}, 'crypto') });
ObjectDefineProperty(globalThis, 'crypto', {
__proto__: null,
configurable: true,
enumerable: true,
writable: true,
value: function crypto() { // eslint-disable-line func-name-matching
throw new ERR_NO_CRYPTO();
},
});
}

0 comments on commit 27008ef

Please sign in to comment.