]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: simplify code in apiWatch.ts (#101)
author扩散性百万甜面包 <himself65@outlook.com>
Sat, 5 Oct 2019 14:44:02 +0000 (22:44 +0800)
committerEvan You <yyx990803@gmail.com>
Sat, 5 Oct 2019 14:44:02 +0000 (10:44 -0400)
packages/runtime-core/src/apiWatch.ts

index f5d5e1448824ca130cf6513245ed326df30e1173..139767c65607c43af5c4375f22fd9afbcb90cad7 100644 (file)
@@ -231,12 +231,12 @@ function traverse(value: any, seen: Set<any> = 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 {