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

Issue with typeof checks handling #2813

Closed
praj-github opened this issue Jan 18, 2018 · 2 comments
Closed

Issue with typeof checks handling #2813

praj-github opened this issue Jan 18, 2018 · 2 comments

Comments

@praj-github
Copy link

praj-github commented Jan 18, 2018

Bug report or feature request?: Bug report

ES5 or ES6+ input?: ES5+

Uglify version (uglifyjs -V): uglify-js 2.8.12

JavaScript input

var xmlHttpReq = new ActiveXObject("MSXML2.XMLHTTP.6.0");
if (typeof xmlHttpReq.setRequestHeader != "undefined") {
console.log("works")
}

Testing this on IE11. This code prints "works".

The uglifyjs CLI command executed or minify() options used.

uglifyjs --compress --mangle --ie8

JavaScript output or error produced.
JS output:
void 0!==new ActiveXObject("MSXML2.XMLHTTP.6.0").setRequestHeader&&console.log("works");

Output error when this was run on IE11:
"Wrong number of arguments or invalid property assignment"

@alexlamsl
Copy link
Collaborator

Not reproducible in latest version of uglify-js

@praj-github
Copy link
Author

Thanks a lot for your response!

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

No branches or pull requests

2 participants