From 1d71f869a54f3078baa0eee65cffdeca4bc4fd87 Mon Sep 17 00:00:00 2001 From: ClDaniel1 Date: Sat, 16 Apr 2022 18:17:22 +0800 Subject: [PATCH] Update hostsFn.ts --- src/common/hostsFn.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/hostsFn.ts b/src/common/hostsFn.ts index fbc3a83ad..223a5fcb9 100644 --- a/src/common/hostsFn.ts +++ b/src/common/hostsFn.ts @@ -143,7 +143,7 @@ export const switchItemParentIsON = ( parent.on = on } else if (parent.children) { let parentOn = true - parent.children.map((item) => { + parent.children.forEach((item) => { if (!item.on) { parentOn = false } @@ -171,7 +171,7 @@ export const switchFolderChild = ( } if (item.children) { - item.children.map((item) => { + item.children.forEach((item) => { item.on = on if (item.type == 'folder') { item = switchFolderChild(item, on)