Skip to content

Commit 3e36734

Browse files
Merge pull request #79 from Alec2435/master
Fixed issue with sync not taking effect
2 parents 65acf2a + 396c41d commit 3e36734

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)