Przeglądaj źródła

Added the missing break (#3021)

Break in loop when condition is fulfilled.
ZhangJan 10 lat temu
rodzic
commit
c4c3ebdd96
1 zmienionych plików z 1 dodań i 0 usunięć
  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
     }