File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,11 @@ const normalizeRequestURL = (
46
46
nextConfig ?: RequestData [ 'nextConfig' ] ,
47
47
) : { url : string ; detectedLocale ?: string } => {
48
48
const url = new URL ( originalURL )
49
- let detectedLocale : string | undefined
50
49
51
50
let pathname = removeBasePath ( url . pathname , nextConfig ?. basePath )
52
51
53
- // If the i18n config is present, remove the locale from the URL and store it
54
- if ( nextConfig ?. i18n ) {
55
- ; ( { detectedLocale } = normalizeLocalePath ( pathname , nextConfig ?. i18n ?. locales ) )
56
- }
52
+ // If it exists, remove the locale from the URL and store it
53
+ const { detectedLocale } = normalizeLocalePath ( pathname , nextConfig ?. i18n ?. locales )
57
54
58
55
if ( ! nextConfig ?. skipMiddlewareUrlNormalize ) {
59
56
// We want to run middleware for data requests and expose the URL of the
You can’t perform that action at this time.
0 commit comments