Przeglądaj źródła

only check keep-alive on dynamic components

Evan You 10 lat temu
rodzic
commit
ef923be57b
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      src/compiler/parser/index.js

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

@@ -326,9 +326,9 @@ function processComponent (el) {
   let binding
   let binding
   if ((binding = getBindingAttr(el, 'is'))) {
   if ((binding = getBindingAttr(el, 'is'))) {
     el.component = binding
     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) {
   if (getAndRemoveAttr(el, 'inline-template') != null) {
     el.inlineTemplate = true
     el.inlineTemplate = true