RXNT/json-rules-engine-simplified

conditionsMeet fails on array of strings

Closed this issue · 1 comments

If the form data is an array, conditionsMeet first tries to see if any elements in the array pass the condition:

https://github.com/RxNT/json-rules-engine-simplified/blob/c271482533324b275341e0598f24bc8c9667c23d/src/conditionsMeet.js#L38-L40

But this means a string gets passed as val to conditionsMeet, which it can't handle.

I think the inner function handling refVal.some() should just return false if val isn't an object rather than letting conditionsMeet throw.

PR #19