Added the missing break (#3021)

Break in loop when condition is fulfilled.
This commit is contained in:
ZhangJan 2016-06-03 00:56:16 +08:00 committed by Evan You
parent 03e0dab1f4
commit c4c3ebdd96

View File

@ -8,6 +8,7 @@ export default function ref (el: ASTElement, dir: ASTDirective) {
while (parent) { while (parent) {
if (parent.for !== undefined) { if (parent.for !== undefined) {
el.refInFor = true el.refInFor = true
break
} }
parent = parent.parent parent = parent.parent
} }