Skip to content

Commit f50025d

Browse files
committed
fix(angular): setup config properly (#24028)
fix view stacks
1 parent 4500bfa commit f50025d

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

packages/vue-router/src/viewStacks.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,17 +220,10 @@ export const createViewStacks = (router: Router) => {
220220
const viewStack = viewStacks[outletId];
221221
if (!viewStack) return;
222222

223-
const { enteringIndex: endIndex, leavingIndex: startIndex } = findViewIndex(viewStack, enteringViewItem, leavingViewItem);
224-
let mountDiff = delta - 1;
223+
const { leavingIndex: startIndex } = findViewIndex(viewStack, enteringViewItem, leavingViewItem);
225224

226-
for (let i = startIndex + 1; i < endIndex; i++) {
225+
for (let i = startIndex + 1; i < startIndex + delta; i++) {
227226
viewStack[i].mount = true;
228-
229-
mountDiff -= 1;
230-
231-
if (mountDiff === 0) {
232-
return;
233-
}
234227
}
235228
}
236229

0 commit comments

Comments
 (0)