Skip to content

Commit a645ce2

Browse files
committed
fix: first navigation issues
1 parent a047a44 commit a645ce2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/router/router.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ export class MobxRouter implements IMobxRouter {
7373

7474
protected hashNavigate(to: RouterToConfig, options?: RouterNavigateParams) {
7575
const path = this.createPath(to);
76-
const url = this.createUrl(path, this.type);
76+
const url = this.createUrl(
77+
{
78+
...path,
79+
baseUrl: this.location.pathname,
80+
},
81+
this.type,
82+
);
7783
const state = options?.state ?? null;
7884

7985
this.wrapInViewTransition(() => {

0 commit comments

Comments
 (0)