From 5ee9aa2410d7ec014e5c43f0b3980be08ba098a6 Mon Sep 17 00:00:00 2001 From: Jakub Maruszczak <101405074+kubamaruszczak@users.noreply.github.com> Date: Thu, 20 Feb 2025 23:16:15 +0100 Subject: [PATCH] fix meshctrl tag filter search (#6798) --- meshctrl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshctrl.js b/meshctrl.js index 9ad850c3..af4f1626 100644 --- a/meshctrl.js +++ b/meshctrl.js @@ -2666,8 +2666,8 @@ function getDevicesThatMatchFilter(nodes, x) { } else if (tagSearch != null) { // Tag filter for (var d in nodes) { - if ((nodes[d].tags == null) && (tagSearch == '')) { r.push(d); } - else if (nodes[d].tags != null) { for (var j in nodes[d].tags) { if (nodes[d].tags[j].toLowerCase() == tagSearch) { r.push(d); break; } } } + if ((nodes[d].tags == null) && (tagSearch == '')) { r.push(nodes[d]); } + else if (nodes[d].tags != null) { for (var j in nodes[d].tags) { if (nodes[d].tags[j].toLowerCase() == tagSearch) { r.push(nodes[d]); break; } } } } } else if (agentTagSearch != null) { // Agent Tag filter