Optional chaining doesn't seem to work
guigiffoni opened this issue · comments
Using optional chaining in JavaScript makes the minifier not generate the file.
Tested in version v2.19.10
Thanks for raising the issue, optional chaining should be supported, but it is strange that there is no output. What is your input? What JavaScript version do you pass to the JS minifer (e.g. 0
, or 2020
)?
After checking closer, I realised that it does output the file, the issue is how I used optional chaining. JavaScript does not allow the usage of assignments, so: this?.variable = 123
is not valid, and JavaScript throws SyntaxError: invalid assignment left-hand side
. That's something from JavaScript, not the minifier.
Sorry for the inconvenience :)
MDN Reference