From ef91eec520d03b92145a4368a850bc1726489227 Mon Sep 17 00:00:00 2001 From: Pietro Brenna Date: Sat, 22 Feb 2020 12:30:28 +0100 Subject: [PATCH] Controllo che length esista --- command-parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command-parse.js b/command-parse.js index a5c3dcf..889bc47 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 > 0) { + if (matches === true || (matches.length && matches.length > 0)) { if (matches.length > 0) { msg.regex_matches[r.match_name] = matches; }