cloudflare-next-intl 0.9.38 → 0.9.40
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
|
|
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
|
}
|
|
@@ -67,7 +67,8 @@ export default function HelperScript() {
|
|
|
67
67
|
} catch (e) { try { console.error('Stale Deploy Early Catch Script Error:', e); } catch (e2) {} }
|
|
68
68
|
})();`
|
|
69
69
|
} }), !isDev &&
|
|
70
|
-
_jsx("script", { id: "build-id-script",
|
|
70
|
+
_jsx("script", { id: "build-id-script", dangerouslySetInnerHTML: {
|
|
71
|
+
__html: `(async function() {
|
|
71
72
|
try {
|
|
72
73
|
const resp = await fetch('/BUILD_ID', { method: 'HEAD', cache: 'no-store' });
|
|
73
74
|
if (resp.ok) {
|
|
@@ -100,7 +101,9 @@ export default function HelperScript() {
|
|
|
100
101
|
} catch (e) {
|
|
101
102
|
try { console.error('Check Build ID Script Error:', e); } catch (e2) {}
|
|
102
103
|
}
|
|
103
|
-
})();`
|
|
104
|
+
})();`
|
|
105
|
+
} }), _jsx("script", { id: "intl-app-state-checker", dangerouslySetInnerHTML: {
|
|
106
|
+
__html: `(function() {
|
|
104
107
|
try {
|
|
105
108
|
/**
|
|
106
109
|
* Efficiently retrieves a cookie value by its name.
|
|
@@ -197,5 +200,6 @@ export default function HelperScript() {
|
|
|
197
200
|
} catch (e) {
|
|
198
201
|
console.error('App State check Script Error:', e);
|
|
199
202
|
}
|
|
200
|
-
})();`
|
|
203
|
+
})();`
|
|
204
|
+
} }), _jsx(ClientHelperScript, {})] });
|
|
201
205
|
}
|
|
@@ -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
|
|
14
|
+
const needsLangPath = localeValue !== undefined && localeValue !== config.defaultLocale;
|
|
15
15
|
let pathnames;
|
|
16
16
|
let urlString;
|
|
17
17
|
if (needsLangPath) {
|