Fix: CSV download

This commit is contained in:
Pieter Vander Vennet 2023-10-19 12:16:44 +02:00
parent c2164e5951
commit c1bce7abc7
2 changed files with 16 additions and 4 deletions

View file

@ -672,16 +672,21 @@ class SvgToPdfPage {
}
public async PrepareLanguage(language: string) {
let host = window.location.host
if(host.startsWith("127.0.0.1")){
host = "mapcomplete.org"
}
// Always fetch the remote data - it's cached anyway
this.layerTranslations[language] = await Utils.downloadJsonCached(
window.location.protocol +
"//" +
window.location.host +
host +
"/assets/langs/layers/" +
language +
".json",
24 * 60 * 60 * 1000
)
}
public async Prepare() {