We got that error in Chrome. The code which is underlined red in the sources tab says for(void 0 in n).
See attached code files of it working in v2.6.3 and the error in v2.8.3.
Thanks for the report - #1524 should address that. If you can give that a spin to confirm that would be great.
If you can give me the original source so I can confirm as well that would also be great. I've just tried your v2.6.3-OK.js.txt and both 2.8.3 and #1524 do not produce any for(void 0.
What are your compress options, in case they are different from the defaults?
function isEmptyObject(e) {
var t = void 0;
for (t in e) {
return !1;
}return !0;
};
--uglifyjs@~2.8.0---->
function d(e){for(void 0 in e)return!1;return!0} // error
--uglifyjs@~2.7.0---->
function d(e){var t=void 0;for(t in e)return!1;return!0} // right
@lianqin7 thanks for the report. Your example is fixed by #1524:
function isEmptyObject(r){var n=void 0;for(n in r)return!1;return!0}
@alexlamsl it would be published by 2.8.?(next Z?)
@lianqin7 after a bit more testing, yes. Should be within the next day.
Sorry for the trouble!
Most helpful comment
@lianqin7 after a bit more testing, yes. Should be within the next day.
Sorry for the trouble!