8000 v-for optimization: only filter watcher list if there are frags removed · GouTao/vue@3b82e2b · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b82e2b

Browse files
committed
v-for optimization: only filter watcher list if there are frags removed
1 parent 16bfe1b commit 3b82e2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/directives/public/for.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ const vFor = {
176176
}
177177
}
178178
this.vm._vForRemoving = false
179-
this.vm._watchers = this.vm._watchers.filter(w => w.active)
179+
if (removalIndex) {
180+
this.vm._watchers = this.vm._watchers.filter(w => w.active)
181+
}
180182

181183
// Final pass, move/insert new fragments into the
182184
// right place.

0 commit comments

Comments
 (0)
0