Change node must handle empty rule set

This commit is contained in:
Nick O'Leary
2018-08-16 09:41:43 +01:00
parent 042409f870
commit 72c400794c
2 changed files with 21 additions and 0 deletions

View File

@@ -283,6 +283,9 @@ module.exports = function(RED) {
}
}
function applyRules(msg, currentRule) {
if (currentRule >= node.rules.length) {
return Promise.resolve(msg);
}
var r = node.rules[currentRule];
var rulePromise;
if (r.t === "move") {