chore: simplify code in apiWatch.ts (#101)

This commit is contained in:
扩散性百万甜面包 2019-10-05 22:44:02 +08:00 committed by Evan You
parent 600ec5de42
commit ec8f7c6375

View 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 {