From c4c3ebdd963dca0ceb1c40d83af997d7bd2958ab Mon Sep 17 00:00:00 2001 From: ZhangJan Date: Fri, 3 Jun 2016 00:56:16 +0800 Subject: [PATCH] Added the missing break (#3021) Break in loop when condition is fulfilled. --- src/compiler/directives/ref.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/directives/ref.js b/src/compiler/directives/ref.js index ee420eca..0452256c 100644 --- a/src/compiler/directives/ref.js +++ b/src/compiler/directives/ref.js @@ -8,6 +8,7 @@ export default function ref (el: ASTElement, dir: ASTDirective) { while (parent) { if (parent.for !== undefined) { el.refInFor = true + break } parent = parent.parent }