Skip to content

Commit 84e8341

Browse files
committed
docs: add comments for some code reasons
1 parent 0171731 commit 84e8341

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/router/router.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ export class MobxRouter implements IMobxRouter {
7676
const url = this.createUrl(
7777
{
7878
...path,
79-
// This
79+
// This is fixes bug with pathname endings /
80+
// If location.pathname is /test-foo then after navigation to /test-foo#bar
81+
// navigation back will not work
82+
// If location.pathname is /test-foo/ then after navigation to /test-foo/#/bar
83+
// navigation back will not work
8084
baseUrl: this.location.pathname,
8185
},
8286
this.type,

src/router/router.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface IMobxRouter {
1212

1313
/**
1414
* The base URL of the router.
15+
* !!! Works only for "browser" router type
1516
*/
1617
baseUrl?: string;
1718

0 commit comments

Comments
 (0)