Skip to content

Commit ebea9a7

Browse files
committed
deleting cached page and storing component in map
1 parent 0353997 commit ebea9a7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Router/utils/router.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,11 @@ export const getComponent = route => {
307307
return null
308308
}
309309

310-
// repace the current with boot instance
310+
// delete existing route instance from memory
311311
export const deleteCurrentInstance = route => {
312-
if(bootcomponents.has(route)){
313-
components.set(route, bootcomponents.get(route))
312+
if (components.has(route) && pagesHost.getIndex(components.get(route)) !== -1) {
313+
pagesHost.remove(components.get(route))
314+
storeComponent(route, components.get(route)._routedType || components.get(route).constructor)
314315
}
315316
}
316317

0 commit comments

Comments
 (0)