mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
fix modes for preload link and fetching request do not match
This commit is contained in:
parent
13d5c01935
commit
5b2bebcdee
2 changed files with 10 additions and 2 deletions
|
@ -81,7 +81,11 @@ class Localization {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async fetchTranslationsFor(newLocale) {
|
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;
|
if (response.redirected === true || response.status !== 200) return false;
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,11 @@ class Localization {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async fetchTranslationsFor(newLocale) {
|
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;
|
if (response.redirected === true || response.status !== 200) return false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue