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 414fc5d commit bbc7c40Copy full SHA for bbc7c40
1 file changed
packages/core/src/runtime/unmount.js
@@ -7,10 +7,10 @@ options.unmount = vnode => {
7
if (typeof type === 'function' && vnodesForComponent.has(type)) {
8
const vnodes = vnodesForComponent.get(type);
9
if (vnodes) {
10
- const index = vnodes.indexOf(vnode);
11
- if (index !== -1) {
12
- vnodes.splice(index, 1);
13
- }
+ const mountedVnodesForType = vnodes.filter(
+ p => p.__c && p.__c !== vnode.__c
+ );
+ vnodesForComponent.set(vnode.type, mountedVnodesForType);
14
}
15
16
0 commit comments