-
Notifications
You must be signed in to change notification settings - Fork 151
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
Make Internet Explorer check compatible with uglify #43
Comments
sounds reasonable. PR welcome! |
We ran into a similar issue here with the updated version of this library. Uglify was moving the @cc_on comments out from where they originally existed in the code, so it executes those checks outside of the initialization block. It's too late to assign variables, even if they did exist in the global namespace. Since there's some user agent sniffing going on for iOS and Android, we just moved the checking for buggy and old IEs to the same format, specifically: var isBuggyIE = /MSIE [0-9]\./i.test(userAgent);
var isOldIE = /MSIE [0-8]\./i.test(userAgent); The regex is a bit hacky, but at least the idea should be sound, unless I'm missing something that you ran into. I guess you could do some more checking, like MS does here. This might close #40 as well. If this sounds good, I'd be happy to do a PR. Great library, by the way, saved us days of headaches. |
looks good to me. any objections from @zoltan-dulac (who originally authored this part)? feel free to send a PR :) |
thank you for the fix, it's released as v0.5.4 |
No problem, hope it works out. -- On July 15, 2015 at 12:31:44 PM, Rodney Rehm ([email protected]) wrote: thank you for the fix, it's released as v0.5.4 — |
Great work, thanks! @dillonlucente @rodneyrehm |
The isOldInternetExplorer variable is always false if using uglify (and maybe other minification methods) since comments gets stripped. I suggest changing to another method for checking Internet Explorer versions.
The text was updated successfully, but these errors were encountered: