We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e7d5db commit 73fa91fCopy full SHA for 73fa91f
packages/runtime-core/src/components/KeepAlive.ts
@@ -195,10 +195,10 @@ const KeepAliveImpl: ComponentOptions = {
195
_unmount(vnode, instance, parentSuspense, true)
196
}
197
198
- function pruneCache(filter?: (name: string) => boolean) {
+ function pruneCache(filter: (name: string) => boolean) {
199
cache.forEach((vnode, key) => {
200
const name = getComponentName(vnode.type as ConcreteComponent)
201
- if (name && (!filter || !filter(name))) {
+ if (name && !filter(name)) {
202
pruneCacheEntry(key)
203
204
})
0 commit comments