From 06f41ad9fe9de374b29be5913cb133ce10204046 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 19 Nov 2016 21:45:37 -0500 Subject: [PATCH] avoid pushing the same ref more than once (fix #4253) --- src/core/vdom/modules/ref.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/vdom/modules/ref.js b/src/core/vdom/modules/ref.js index f7cd6f14..040e8ead 100644 --- a/src/core/vdom/modules/ref.js +++ b/src/core/vdom/modules/ref.js @@ -32,7 +32,7 @@ export function registerRef (vnode: VNodeWithData, isRemoval: ?boolean) { } } else { if (vnode.data.refInFor) { - if (Array.isArray(refs[key])) { + if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) { refs[key].push(ref) } else { refs[key] = [ref]