-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
In the ExpressionEngine in line 728 there is a piece of code which tries to replace "==" by "=".
myStr = myStr.replace(new RegExp('=='), '=');
This only replaces the first occurrence of all available "==".
So a more complex expression like
(a > 3 && b == 'abc') || (partNumber == 'xyz' || (properties.cellType == 'Battery' && (dut.id <= 1 || dut.p == 3)))
fails to evaluate because only b == 'abc' will be replaced by b = 'abc'.
If I change the code to
myStr = myStr.replace(new RegExp('==', 'g'), '=');
all occurrences get replaced and evaluation of the given expression passes.
Metadata
Metadata
Assignees
Labels
No labels