Skip to content

Commit 85b5390

Browse files
authored
fix
1 parent 3d4feff commit 85b5390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser-router.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default class BrowserRouter extends Router {
7575
if (this.router.isRunning) this.router.cancel();
7676
const currentTransition = this.router.currentTransition;
7777
let opts = { path, ctx: new Context() };
78-
if (state.ctx) opts.ctx = state.ctx;
78+
if (state && state.ctx) opts.ctx = state.ctx;
7979
let { location, route, status, params, redirect, result, ctx, error } = await this.router.run(opts);
8080
if (error && error.message === 'Cancelled') return;
8181
if (error !== null && error.message !== 'Cancelled') {

0 commit comments

Comments
 (0)