Browse Source

fix(keep-alive): higher priority for exclude than include (#6905)

lucien 8 years ago
parent
commit
604230fe95
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/components/keep-alive.js

+ 2 - 2
src/core/components/keep-alive.js

@@ -87,8 +87,8 @@ export default {
       // check pattern
       const name: ?string = getComponentName(componentOptions)
       if (name && (
-        (this.include && !matches(this.include, name)) ||
-        (this.exclude && matches(this.exclude, name))
+        (this.exclude && matches(this.exclude, name)) ||
+        (this.include && !matches(this.include, name))
       )) {
         return vnode
       }