mirror of https://github.com/vuejs/core.git
refactor: remove unnecessary check as filter is always non-null (#11599)
This commit is contained in:
parent
4e7d5db4d2
commit
73fa91fabd
|
@ -195,10 +195,10 @@ const KeepAliveImpl: ComponentOptions = {
|
||||||
_unmount(vnode, instance, parentSuspense, true)
|
_unmount(vnode, instance, parentSuspense, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
function pruneCache(filter?: (name: string) => boolean) {
|
function pruneCache(filter: (name: string) => boolean) {
|
||||||
cache.forEach((vnode, key) => {
|
cache.forEach((vnode, key) => {
|
||||||
const name = getComponentName(vnode.type as ConcreteComponent)
|
const name = getComponentName(vnode.type as ConcreteComponent)
|
||||||
if (name && (!filter || !filter(name))) {
|
if (name && !filter(name)) {
|
||||||
pruneCacheEntry(key)
|
pruneCacheEntry(key)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue