浏览代码

only check keep-alive on dynamic components

Evan You 10 年之前
父节点
当前提交
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