From 08261778e039abae0be16d001923dcc87ce168a4 Mon Sep 17 00:00:00 2001 From: Kevin Fleischman Date: Fri, 19 Mar 2021 05:45:27 -0400 Subject: [PATCH] fix(utils): fix warning thrown by Webpack (#2843) 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); }