Ver Fonte

remove a needless if. (#3034)

Since always remove the old class.
ZhangJan há 10 anos atrás
pai
commit
ccd8700058
1 ficheiros alterados com 1 adições e 3 exclusões
  1. 1 3
      src/directives/internal/transition.js

+ 1 - 3
src/directives/internal/transition.js

@@ -13,9 +13,7 @@ export default {
     id = id || 'v'
     id = id || 'v'
     oldId = oldId || 'v'
     oldId = oldId || 'v'
     el.__v_trans = new Transition(el, id, hooks, this.vm)
     el.__v_trans = new Transition(el, id, hooks, this.vm)
-    if (oldId) {
-      removeClass(el, oldId + '-transition')
-    }
+    removeClass(el, oldId + '-transition')
     addClass(el, id + '-transition')
     addClass(el, id + '-transition')
   }
   }
 }
 }