You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: