Skip to content

Commit b7d0b80

Browse files
author
Matt Lavallee
committed
refactor(component): simplifying memory cleanup logic
1 parent 0c57049 commit b7d0b80

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/core/vdom/helpers/resolve-async-component.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,10 @@ export function resolveAsyncComponent (
6464
const forceRender = (renderCompleted: boolean) => {
6565
for (let i = 0, l = contexts.length; i < l; i++) {
6666
contexts[i].$forceUpdate()
67+
}
6768

68-
if (!renderCompleted) {
69-
continue
70-
}
71-
72-
const contextIdx = i
73-
contexts[i].$nextTick(() => {
74-
contexts.splice(contextIdx, 1)
75-
})
69+
if (renderCompleted) {
70+
contexts.length = 0
7671
}
7772
}
7873

0 commit comments

Comments
 (0)