Skip to content

Commit

Permalink
Proposed fix for ./log module not found (#1050)
Browse files Browse the repository at this point in the history
* Proposed fix for ./log module not found

* Fixed code

* Replaces spaces with tabs..
  • Loading branch information
johan-lejdung authored and shellscape committed Aug 23, 2017
1 parent b2cf847 commit 0b4729f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ var onSocketMsg = {
},
"log-level": function(level) {
var hotCtx = require.context("webpack/hot", false, /^\.\/log$/);
if(hotCtx.keys().length > 0) {
var contextKeys = hotCtx.keys();
if(contextKeys.length && contextKeys["./log"]) {
hotCtx("./log").setLogLevel(level);
}
switch(level) {
Expand Down

0 comments on commit 0b4729f

Please sign in to comment.