Skip to content
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

Use typeof(console) to prevent IE 7 error #11598

Closed
wants to merge 8 commits into from

Conversation

knixeur
Copy link

@knixeur knixeur commented Apr 6, 2017

When using directly console !== undefined, older IE versions
throw an error as they're actually tring to access an undefined
value. Use globally supported typeof(console) !== 'undefined'.

@knixeur
Copy link
Author

knixeur commented Apr 6, 2017

I see now in the code that you use typeof obj in some other lines without parenthesis. If you want to keep it in the same style, let me know.
Thanks.

@sgiehl
Copy link
Member

sgiehl commented Apr 9, 2017

as typeof is not a function please use it without parenthesis.

When using directly console !== undefined, older IE versions
throw an error as they're actually tring to access an undefined
value. Use globally supported typeof(console) !== 'undefined'.
@knixeur
Copy link
Author

knixeur commented Apr 11, 2017

Closing and reopening a cleaner PR

@knixeur knixeur closed this Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants