Skip to content

Commit

Permalink
Fixed check for webpack/hot/log when setting HMR log level. (#1096)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbogdan authored and shellscape committed Sep 20, 2017
1 parent bad7ed5 commit 114e67c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ const onSocketMsg = {
},
'log-level': function logLevel(level) {
const hotCtx = require.context('webpack/hot', false, /^\.\/log$/);
const contextKeys = hotCtx.keys();
if (contextKeys.length && contextKeys['./log']) {
if (hotCtx.keys().indexOf('./log') !== -1) {
hotCtx('./log').setLogLevel(level);
}
switch (level) {
Expand Down

0 comments on commit 114e67c

Please sign in to comment.