Skip to content

Commit c7fe694

Browse files
committed
fix(router): invalid url
1 parent 540c33b commit c7fe694

File tree

1 file changed

+2
-2
lines changed
  • packages/core/src/components/router/utils

1 file changed

+2
-2
lines changed

packages/core/src/components/router/utils/dom.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { breadthFirstSearch } from './common';
22
import { NavOutlet, RouteChain } from './interfaces';
33

4-
export function writeNavState(root: HTMLElement, chain: RouteChain, index: number, direction: number): Promise<void> {
5-
if (index >= chain.length) {
4+
export function writeNavState(root: HTMLElement, chain: RouteChain|null, index: number, direction: number): Promise<void> {
5+
if (!chain || index >= chain.length) {
66
return Promise.resolve();
77
}
88
const route = chain[index];

0 commit comments

Comments
 (0)