Parcourir la source

fix v-else inserting else block multiple times

Evan You il y a 10 ans
Parent
commit
e9b87a3adf
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/directives/public/if.js

+ 1 - 1
src/directives/public/if.js

@@ -52,7 +52,7 @@ module.exports = {
       this.frag.remove()
       this.frag = null
     }
-    if (this.elseFactory) {
+    if (this.elseFactory && !this.elseFrag) {
       this.elseFrag = this.elseFactory.create(this._host, this._scope, this._frag)
       this.elseFrag.before(this.anchor)
     }