Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 55d80d1

Browse files
committed
Improve i18n routing
1 parent e809ba2 commit 55d80d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

framework/core/routing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class Routing {
130130
this._rewrites
131131
)
132132

133-
let locale = this._defaultLocale
133+
let locale = null as null | string
134134
let pathname = decodeURI(url.pathname)
135135
let routePath = ''
136136
let params = {} as Record<string, string>
@@ -167,7 +167,7 @@ export class Routing {
167167
return [
168168
{
169169
basePath: this._basePath,
170-
locale,
170+
locale: locale || this._defaultLocale,
171171
defaultLocale: this._defaultLocale,
172172
locales: this._locales,
173173
pathname,

0 commit comments

Comments
 (0)