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 #11610

Closed
wants to merge 2 commits into from

Conversation

knixeur
Copy link

@knixeur knixeur commented Apr 11, 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'.

Changed typeof() to typeof as it's not a function

Thanks @sgiehl

Please issue pull request against the 3.x-dev branch only.

Piwik 2 is in LTS mode. This means we do not accept any pull request for 2.x except critical security bugs and major data loss bugs.

If you need to create a pull request for 2.x, then please also create the pull request against the 3.x-dev so we can merge both.

Happy hacking!

@sgiehl sgiehl added this to the 3.0.4 milestone Apr 18, 2017
@sgiehl
Copy link
Member

sgiehl commented Apr 18, 2017

In that file there are still other occurences of console !== undefined, could you change them as well?

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'.

Changed typeof(<var>) to typeof <var> as it's not a function

Thanks @sgiehl
@knixeur
Copy link
Author

knixeur commented Apr 18, 2017

@sgiehl sure, i've just updated the PR

@mattab
Copy link
Member

mattab commented May 8, 2017

Thanks @knixeur for your Pull request! I've re-created it in #11668 with your commits, and made JSlint validation test pass + merged 3.x-dev and minified the files.

We're looking forward to your next contributions 👍

@mattab mattab closed this May 8, 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