Просмотр исходного кода

fix bind order for block repeat

Evan You 11 лет назад
Родитель
Сommit
cd3f5abe8a
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/directives/repeat.js

+ 3 - 3
src/directives/repeat.js

@@ -26,13 +26,13 @@ module.exports = {
     this.checkIf()
     this.checkIf()
     this.checkRef()
     this.checkRef()
     this.checkComponent()
     this.checkComponent()
+    // setup ref node
+    this.ref = document.createComment('v-repeat')
+    _.replace(this.el, this.ref)
     // check if this is a block repeat
     // check if this is a block repeat
     if (this.el.tagName === 'TEMPLATE') {
     if (this.el.tagName === 'TEMPLATE') {
       this.el = templateParser.parse(this.el)
       this.el = templateParser.parse(this.el)
     }
     }
-    // setup ref node
-    this.ref = document.createComment('v-repeat')
-    _.replace(this.el, this.ref)
     // instance holders
     // instance holders
     this.data = this.vms = this.oldData = this.oldVms = null
     this.data = this.vms = this.oldData = this.oldVms = null
   },
   },