fix modes for preload link and fetching request do not match
This commit is contained in:
parent
13d5c01935
commit
5b2bebcdee
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue