Skip to content

Commit

Permalink
use self.crypto instead of self['crypto']
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijah Soria committed Apr 6, 2020
1 parent fc678eb commit f99f7be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/random.js
Expand Up @@ -30,7 +30,7 @@ export function getRandomInts(numInts, maxVal) {
: new Uint32Array(numInts);

const isIE = !!self['msCrypto'];
const localCrypto = isIE ? self['msCrypto'] : self['crypto'];
const localCrypto = isIE ? self['msCrypto'] : self.crypto;
if (localCrypto && localCrypto.getRandomValues) {
localCrypto.getRandomValues(arr);
for (let i = arr.length - 1; i > -1; i--) {
Expand Down

0 comments on commit f99f7be

Please sign in to comment.