Skip to content

Commit

Permalink
handle include/exclude changing to non-valid types (fix #4749)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 19, 2017
1 parent d01104e commit 458671b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/components/keep-alive.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ function getComponentName (opts: ?VNodeComponentOptions): ?string {
function matches (pattern: string | RegExp, name: string): boolean {
if (typeof pattern === 'string') {
return pattern.split(',').indexOf(name) > -1
} else {
} else if (pattern instanceof RegExp) {
return pattern.test(name)
}
return false
}

function pruneCache (cache, filter) {
Expand Down

0 comments on commit 458671b

Please sign in to comment.