diff --git a/memory.js b/memory.js index d4e16c2..34ec562 100644 --- a/memory.js +++ b/memory.js @@ -17,7 +17,7 @@ var sink function loadSink () { if (sink) return sink - var MessageChannel = global.MessageChannel + var MessageChannel = globalThis.MessageChannel if (MessageChannel == null) ({ MessageChannel } = require('worker' + '_threads')) sink = new MessageChannel() return sink diff --git a/randombytes.js b/randombytes.js index f0060c0..5d6f442 100644 --- a/randombytes.js +++ b/randombytes.js @@ -2,7 +2,7 @@ var assert = require('nanoassert') var randombytes = (function () { var QUOTA = 65536 // limit for QuotaExceededException - var crypto = global.crypto || global.msCrypto + var crypto = globalThis.crypto || globalThis.msCrypto function browserBytes (out, n) { for (let i = 0; i < n; i += QUOTA) {