Skip to content

Commit

Permalink
fix: remove optional crypto dependency (webpack compatibility) (#3358)
Browse files Browse the repository at this point in the history
  • Loading branch information
straker authored Jan 21, 2022
1 parent ee49d3e commit aa9d095
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
9 changes: 0 additions & 9 deletions lib/core/utils/uuid.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ if (!_rng && _crypto && _crypto.getRandomValues) {
};
}

try {
if (!_rng) {
const nodeCrypto = require('crypto');
_rng = () => nodeCrypto.randomBytes(16);
}
} catch (e) {
/* do nothing */
}

if (!_rng) {
// Math.random()-based (RNG)
//
Expand Down
19 changes: 0 additions & 19 deletions test/node/uuid.js

This file was deleted.

0 comments on commit aa9d095

Please sign in to comment.