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

only check keep-alive on dynamic components

Evan You 10 лет назад
Родитель
Сommit
ef923be57b
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/compiler/parser/index.js

+ 3 - 3
src/compiler/parser/index.js

@@ -326,9 +326,9 @@ function processComponent (el) {
   let binding
   if ((binding = getBindingAttr(el, 'is'))) {
     el.component = binding
-  }
-  if (getAndRemoveAttr(el, 'keep-alive') != null) {
-    el.keepAlive = true
+    if (getAndRemoveAttr(el, 'keep-alive') != null) {
+      el.keepAlive = true
+    }
   }
   if (getAndRemoveAttr(el, 'inline-template') != null) {
     el.inlineTemplate = true