New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed fix for ./log module not found #1050
Proposed fix for ./log module not found #1050
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1050 +/- ##
=======================================
Coverage 72.25% 72.25%
=======================================
Files 4 4
Lines 465 465
Branches 139 139
=======================================
Hits 336 336
Misses 129 129 Continue to review full report at Codecov.
|
client/index.js
Outdated
@@ -79,7 +79,7 @@ var onSocketMsg = { | |||
}, | |||
"log-level": function(level) { | |||
var hotCtx = require.context("webpack/hot", false, /^\.\/log$/); | |||
if(hotCtx.keys().length > 0) { | |||
if(hotCtx.keys().length > 0 && hotCtx.keys()["./log"]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a small modification here please.
var contextKeys = hotCtx.keys();
if(contextKeys.length && contextKeys["./log"]) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely!
@johan-lejdung thanks for the PR! we have one small change request and then we'll be happy to merge. |
Thanks! |
What kind of change does this PR introduce?
Bugfix of #1049
Did you add or update the
examples/
?No
Summary
This is a proposed fix of the #1049
Instead of just assuming that the module ./log is loaded there is a check to see if it actually is.
Does this PR introduce a breaking change?
It should not!
Other information