Controllo che length esista
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user