Open hea-lab opened 5 years ago
This issue is similar to #189
The following two examples should not trigger the action, but they do with the current code
d.ruleset('test', function() { whenAll: m.array1.anyItem(item.array2.anyItem(item.field21 == 2) && item.field == 8 && +item.field2) }); d.post('test',{array1: [{array2 : [{field21 : 2}], field : 8}]});
d.ruleset('test', function() { whenAll: m.array1.anyItem(item.array2.anyItem(item.field21 == 2) || item.field == 8) run: console.log("ok", JSON.stringify(m)) }); d.post('test',{array1: [{array2 : [{field21 : 3}], field : 3}]});
Hi, I'm working on a fix. Unfortunately it is a little more involved.
I have pushed a fix for array evaluation. The rules above now work as expected. Please use version 2.0.7.
This issue is similar to #189
The following two examples should not trigger the action, but they do with the current code