From ec8f7c6375c646f700fb18c1e405973e9b0ed368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=A9=E6=95=A3=E6=80=A7=E7=99=BE=E4=B8=87=E7=94=9C?= =?UTF-8?q?=E9=9D=A2=E5=8C=85?= Date: Sat, 5 Oct 2019 22:44:02 +0800 Subject: [PATCH] chore: simplify code in apiWatch.ts (#101) --- packages/runtime-core/src/apiWatch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index f5d5e144..139767c6 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -231,12 +231,12 @@ function traverse(value: any, seen: Set = new Set()) { traverse(value[i], seen) } } else if (value instanceof Map) { - ;(value as any).forEach((v: any, key: any) => { + value.forEach((v, key) => { // to register mutation dep for existing keys traverse(value.get(key), seen) }) } else if (value instanceof Set) { - ;(value as any).forEach((v: any) => { + value.forEach(v => { traverse(v, seen) }) } else {