[BUG] Error during evaluation of conditional (ternary) operator
The script in the Illustrator produces an error during evaluation of a conditional expression that includes a nested conditional expression without parenthesis.
This breaks JavaScript optimization tools e.g. Google Closure Compiler.
Scenario:
alert(true ? true ? 1 : 2 : 3);
Expected:
Standard dialog with message: "1".
Actual:
Dialog with message "Error 25: Expected: :."
Workaround:
alert(true ? (true ? 1 : 2) : 3);
System info:
Illustrator Version: 23.0.1
OS: OS X
Version: 10.14
System Architecture: x64
3
votes
![](https://secure.gravatar.com/avatar/d3596cc6bcc7501374c5b3850ce778ad?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)