Controllo anche il null
parent
ef91eec520
commit
d97866933e
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue