-
Notifications
You must be signed in to change notification settings - Fork 318
Check for console #185
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
Check for console #185
Conversation
Current coverage is 9.32% (diff: 100%)@@ master #185 diff @@
========================================
Files 5 5
Lines 118 118
Methods 0 0
Messages 0 0
Branches 0 0
========================================
Hits 11 11
Misses 107 107
Partials 0 0
|
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.
@vectart, could you, please, explain why we need that change? How could this problem be reproduced?
@@ -1,6 +1,6 @@ | |||
export default { | |||
level: `log`, | |||
logger: console, | |||
logger: (this && this['console']) || (window && window['console']), |
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.
@vectart, the build fails on linting step. You should use this.console
and window.console
here.
But anyway, I don't really understand the reason for this change. console
object is defined in Internet Explorer 9 by default, isn't it?
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.
It's undefined until Developer Panel has been opened http://stackoverflow.com/questions/7742781/why-does-javascript-only-work-after-opening-developer-tools-in-ie-once
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.
Build is fixed
@grushetsky Yes, the console is undefined until Developer Panel has been opened http://stackoverflow.com/questions/7742781/why-does-javascript-only-work-after-opening-developer-tools-in-ie-once |
@vectart, OK, I see the point, thanks for finding this problem. Why do we need to check for |
@grushetsky it's for node environment |
@vectart, oh, sure. 👌🏻 |
I got the same error. Have to use |
This fix should work on node |
@grushetsky @vectart guys please fix this, I revert that PR for now |
It breaks in IE9 when the package is just required.