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
The priority of the current module is && and | | is the same,The result of ' 'true && true || false && false'' is false.But in JavaScript, '&&' than '| |' priority,so The result of ' 'true && true || false && false'' is true.
My solution so far is to rewrite the priorities。The following:
jexl.addBinaryOp('&&', 11, (left, right) => {
return left && right;
});
The text was updated successfully, but these errors were encountered:
Sorry for the late response to this -- this is a great observation. While Jexl's goal isn't to mirror Javascript, I think this is a great move for predictability. It is a breaking change, though, so this will come in the next major version release.
The priority of the current module is && and | | is the same,The result of ' 'true && true || false && false'' is false.But in JavaScript, '&&' than '| |' priority,so The result of ' 'true && true || false && false'' is true.
My solution so far is to rewrite the priorities。The following:
jexl.addBinaryOp('&&', 11, (left, right) => {
return left && right;
});
The text was updated successfully, but these errors were encountered: