Преглед изворни кода

Added the missing break (#3021)

Break in loop when condition is fulfilled.
ZhangJan пре 10 година
родитељ
комит
c4c3ebdd96
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      src/compiler/directives/ref.js

+ 1 - 0
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
     }