Skip to content

Commit

Permalink
fix(utils): fix warning thrown by Webpack (#2843)
Browse files Browse the repository at this point in the history
Fixes a warning thrown by Webpack for using "require" without importing
anything. Warning reads "require function is used in a way in which
dependencies cannot be statically extracted"

Closes issue #2840
  • Loading branch information
istateside authored Mar 19, 2021
1 parent fbaf281 commit 0826177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/utils/uuid.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (!_rng && _crypto && _crypto.getRandomValues) {
}

try {
if (!_rng && require) {
if (!_rng) {
const nodeCrypto = require('crypto');
_rng = () => nodeCrypto.randomBytes(16);
}
Expand Down

0 comments on commit 0826177

Please sign in to comment.