mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
remove api check
This commit is contained in:
1 parent
aaf0e52be4
commit
92c8b90bb3
1 file changed
-2
@@ -3,7 +3,6 @@
|
|||||||
import { getBestLocale } from "../core/i18n/getBestLocale";
|
import { getBestLocale } from "../core/i18n/getBestLocale";
|
||||||
|
|
||||||
const pathname = window.location.pathname;
|
const pathname = window.location.pathname;
|
||||||
const isAPI = pathname.startsWith("/api");
|
|
||||||
const hasPreference = localStorage.getItem("preferred-locale") !== null;
|
const hasPreference = localStorage.getItem("preferred-locale") !== null;
|
||||||
const bestLocale = getBestLocale();
|
const bestLocale = getBestLocale();
|
||||||
const currentLocale =
|
const currentLocale =
|
||||||
@@ -14,7 +13,6 @@
|
|||||||
)?.locale ?? locales.default;
|
)?.locale ?? locales.default;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!isAPI &&
|
|
||||||
bestLocale !== currentLocale &&
|
bestLocale !== currentLocale &&
|
||||||
(hasPreference || currentLocale === locales.default)
|
(hasPreference || currentLocale === locales.default)
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in new issue
Block a user