mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-05-20 11:25:02 +00:00
fix modes for preload link and fetching request do not match
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user