Skip to content

Commit c96d842

Browse files
committed
add index to debug
1 parent b7471cd commit c96d842

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ const createFactEvaluator =
3232
type: 'EVALUATED_FACT',
3333
fact: factName,
3434
rule,
35+
index,
3536
value,
3637
resolved,
3738
is,
38-
index,
3939
result,
4040
});
4141
return {
@@ -198,6 +198,9 @@ const createRulesEngine = ({
198198
...options
199199
} = {}) => {
200200
options = { ...defaults, ...options };
201+
202+
if (!options.validator) throw new Error('A validator is required');
203+
201204
const eventMap = new Map();
202205

203206
const emit = (event, ...args) =>

0 commit comments

Comments
 (0)