Skip to content

Commit 114e67c

Browse files
lbogdanshellscape
authored andcommitted
Fixed check for webpack/hot/log when setting HMR log level. (#1096)
1 parent bad7ed5 commit 114e67c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

client/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ const onSocketMsg = {
9292
},
9393
'log-level': function logLevel(level) {
9494
const hotCtx = require.context('webpack/hot', false, /^\.\/log$/);
95-
const contextKeys = hotCtx.keys();
96-
if (contextKeys.length && contextKeys['./log']) {
95+
if (hotCtx.keys().indexOf('./log') !== -1) {
9796
hotCtx('./log').setLogLevel(level);
9897
}
9998
switch (level) {

0 commit comments

Comments
 (0)