mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-04 09:11:34 -07:00
FE: mixed case on MACs broke node expansion/collapse
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -570,10 +570,10 @@ function getChildren(node, list, path, visited = [])
|
|||||||
// Loop through all items to find children of the current node
|
// Loop through all items to find children of the current node
|
||||||
for (var i in list) {
|
for (var i in list) {
|
||||||
const item = list[i];
|
const item = list[i];
|
||||||
const parentMac = item.devParentMAC || ""; // null-safe
|
const parentMac = item.devParentMAC.toLowerCase() || ""; // null-safe
|
||||||
const nodeMac = node.devMac || ""; // null-safe
|
const nodeMac = node.devMac.toLowerCase() || ""; // null-safe
|
||||||
|
|
||||||
if (parentMac != "" && parentMac.toLowerCase() == nodeMac.toLowerCase() && !hiddenMacs.includes(parentMac)) {
|
if (parentMac != "" && parentMac == nodeMac && !hiddenMacs.includes(parentMac)) {
|
||||||
|
|
||||||
visibleNodesCount++;
|
visibleNodesCount++;
|
||||||
|
|
||||||
@@ -654,6 +654,8 @@ function toggleSubTree(parentMac, treePath)
|
|||||||
{
|
{
|
||||||
treePath = treePath.split('|')
|
treePath = treePath.split('|')
|
||||||
|
|
||||||
|
parentMac = parentMac.toLowerCase()
|
||||||
|
|
||||||
if(!hiddenMacs.includes(parentMac))
|
if(!hiddenMacs.includes(parentMac))
|
||||||
{
|
{
|
||||||
hiddenMacs.push(parentMac)
|
hiddenMacs.push(parentMac)
|
||||||
|
|||||||
Reference in New Issue
Block a user