fix modes for preload link and fetching request do not match

This commit is contained in:
schlagmichdoch 2023-10-13 23:07:35 +02:00
parent 13d5c01935
commit 5b2bebcdee
2 changed files with 10 additions and 2 deletions

View file

@ -81,7 +81,11 @@ class Localization {
}
static async fetchTranslationsFor(newLocale) {
const response = await fetch(`lang/${newLocale}.json`)
const response = await fetch(`lang/${newLocale}.json`, {
method: 'GET',
credentials: 'include',
mode: 'no-cors',
});
if (response.redirected === true || response.status !== 200) return false;