cloudflare-next-intl 0.9.38 → 0.9.39

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.
@@ -7,7 +7,7 @@ export default function DefaultPrivacyPolicyLink({ privacyPolicyPath, text, clas
7
7
  if (privacyPolicyPath === false)
8
8
  return null;
9
9
  const localeValue = getLocaleCache();
10
- const needsLangPath = localeValue !== config.defaultLocale || !localeValue;
10
+ const needsLangPath = localeValue !== undefined && localeValue !== config.defaultLocale;
11
11
  const href = needsLangPath ? `/${localeValue}${privacyPolicyPath}` : privacyPolicyPath;
12
12
  return (_jsx(NextLink, { href: href, className: className, style: style, children: text }));
13
13
  }
@@ -11,7 +11,7 @@ function CustomLinkFunction({ href, prefetch, prefetchType = 'custom', hoverPref
11
11
  const localeValue = getLocaleCache();
12
12
  const router = useRouter();
13
13
  prefetch ?? (prefetch = config.link?.defaultPrefetch ?? true);
14
- const needsLangPath = localeValue !== config.defaultLocale || !localeValue;
14
+ const needsLangPath = localeValue !== undefined && localeValue !== config.defaultLocale;
15
15
  let pathnames;
16
16
  let urlString;
17
17
  if (needsLangPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudflare-next-intl",
3
- "version": "0.9.38",
3
+ "version": "0.9.39",
4
4
  "description": "Optimized Next Intl Package Special for App Router and Cloudflare",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",