Skip to content

Commit 396c41d

Browse files
committed
Fixed issue with sync not taking effect
Made minor modification which allows the sync function to actually take effect so that the rules queue can have rules disabled, enabled, and repiroritized on the fly.
1 parent 182778d commit 396c41d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/node-rules.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
RuleEngine.prototype.execute = function(fact, callback) {
5050
//these new attributes have to be in both last session and current session to support
5151
// the compare function
52+
var thisHolder = this;
5253
var complete = false;
5354
fact.result = true;
5455
var session = clonedeep(fact);
@@ -93,6 +94,7 @@
9394
}
9495
}
9596
};
97+
_rules = thisHolder.activeRules;
9698
if (x < _rules.length && complete === false) {
9799
var _rule = _rules[x].condition;
98100
_rule.call(session, API, session);

0 commit comments

Comments
 (0)