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

refactor: remove unnecessary condition (#6716)

Clark Du 8 лет назад
Родитель
Сommit
64f9d68844
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/platforms/web/runtime/components/transition.js

+ 1 - 1
src/platforms/web/runtime/components/transition.js

@@ -165,7 +165,7 @@ export default {
     ) {
     ) {
       // replace old child transition data with fresh one
       // replace old child transition data with fresh one
       // important for dynamic transitions!
       // important for dynamic transitions!
-      const oldData: Object = oldChild && (oldChild.data.transition = extend({}, data))
+      const oldData: Object = oldChild.data.transition = extend({}, data)
       // handle transition mode
       // handle transition mode
       if (mode === 'out-in') {
       if (mode === 'out-in') {
         // return placeholder node and queue update when leave finishes
         // return placeholder node and queue update when leave finishes