Skip to content

Commit 06f41ad

Browse files
committed
avoid pushing the same ref more than once (fix vuejs#4253)
1 parent 4dccbbc commit 06f41ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/vdom/modules/ref.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function registerRef (vnode: VNodeWithData, isRemoval: ?boolean) {
3232
}
3333
} else {
3434
if (vnode.data.refInFor) {
35-
if (Array.isArray(refs[key])) {
35+
if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {
3636
refs[key].push(ref)
3737
} else {
3838
refs[key] = [ref]

0 commit comments

Comments
 (0)