From 8a68a8269b8e04c8291c22afcf50c54d45b39235 Mon Sep 17 00:00:00 2001 From: Kevin Fleischman Date: Tue, 16 Mar 2021 16:35:10 -0400 Subject: [PATCH] fix(utils): fix warning thrown by Webpack 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 --- lib/core/utils/uuid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/utils/uuid.js b/lib/core/utils/uuid.js index 99484d4bd5..cf2d2e5f9b 100644 --- a/lib/core/utils/uuid.js +++ b/lib/core/utils/uuid.js @@ -24,7 +24,7 @@ if (!_rng && _crypto && _crypto.getRandomValues) { } try { - if (!_rng && require) { + if (!_rng) { const nodeCrypto = require('crypto'); _rng = () => nodeCrypto.randomBytes(16); }