next-intl 4.3.6 → 4.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,7 +22,7 @@ function useBasePathname(config) {
|
|
|
22
22
|
const isPathnamePrefixed = hasPathnamePrefixed(prefix, pathname);
|
|
23
23
|
if (isPathnamePrefixed) {
|
|
24
24
|
unlocalizedPathname = unprefixPathname(pathname, prefix);
|
|
25
|
-
} else if (config.localePrefix.mode
|
|
25
|
+
} else if (config.localePrefix.mode !== 'never' && config.localePrefix.prefixes) {
|
|
26
26
|
// Workaround for https://github.com/vercel/next.js/issues/73085
|
|
27
27
|
const localeAsPrefix = getLocaleAsPrefix(locale);
|
|
28
28
|
if (hasPathnamePrefixed(localeAsPrefix, pathname)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{usePathname as e}from"next/navigation";import{useMemo as r}from"react";import{useLocale as o}from"use-intl";import{hasPathnamePrefixed as t,unprefixPathname as i,getLocalePrefix as f,getLocaleAsPrefix as l}from"../../shared/utils.js";function n(n){const s=e(),a=o();return r((()=>{if(!s)return s;let e=s;const r=f(a,n.localePrefix);if(t(r,s))e=i(s,r);else if("
|
|
1
|
+
import{usePathname as e}from"next/navigation";import{useMemo as r}from"react";import{useLocale as o}from"use-intl";import{hasPathnamePrefixed as t,unprefixPathname as i,getLocalePrefix as f,getLocaleAsPrefix as l}from"../../shared/utils.js";function n(n){const s=e(),a=o();return r((()=>{if(!s)return s;let e=s;const r=f(a,n.localePrefix);if(t(r,s))e=i(s,r);else if("never"!==n.localePrefix.mode&&n.localePrefix.prefixes){const r=l(a);t(r,s)&&(e=i(s,r))}return e}),[n.localePrefix,a,s])}export{n as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-intl",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.7",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Jan Amann <jan@amann.work>",
|
|
6
6
|
"funding": [
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"dependencies": {
|
|
113
113
|
"@formatjs/intl-localematcher": "^0.5.4",
|
|
114
114
|
"negotiator": "^1.0.0",
|
|
115
|
-
"use-intl": "^4.3.
|
|
115
|
+
"use-intl": "^4.3.7"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"next": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"optional": true
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "bc4e86eeac892403555af0dd2cdc18117dbefdde"
|
|
128
128
|
}
|