diff --git a/command-parse.js b/command-parse.js index 889bc47..880c25d 100644 --- a/command-parse.js +++ b/command-parse.js @@ -145,7 +145,7 @@ module.exports = function (RED) { let n_matches = 0; for (let r of this.rules) { let matches = check_rule(r, token); - if (matches === true || (matches.length && matches.length > 0)) { + if (matches === true || (matches != null && matches.length && matches.length > 0)) { if (matches.length > 0) { msg.regex_matches[r.match_name] = matches; }