Nonsensical const error with inline PHP in JavaScript
This doesn't seem right:
If I substitute the php for just the word true or false, there's no error:


Looks like PHPStorm is not understanding that the ternary will return either the raw string true or false to the JavaScript code which will be interpreted as nothing other than a boolean.
Please sign in to leave a comment.
Reported as https://youtrack.jetbrains.com/issue/WEB-42918