Skip to content

Commit 458671b

Browse files
committed
handle include/exclude changing to non-valid types (fix #4749)
1 parent d01104e commit 458671b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/core/components/keep-alive.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ function getComponentName (opts: ?VNodeComponentOptions): ?string {
1212
function matches (pattern: string | RegExp, name: string): boolean {
1313
if (typeof pattern === 'string') {
1414
return pattern.split(',').indexOf(name) > -1
15-
} else {
15+
} else if (pattern instanceof RegExp) {
1616
return pattern.test(name)
1717
}
18+
return false
1819
}
1920

2021
function pruneCache (cache, filter) {

0 commit comments

Comments
 (0)