fix: don't take outdated values from .map file on load

This commit is contained in:
Azgaar 2023-08-09 18:18:29 +04:00
parent b0887b14d6
commit 71cc739b4d
4 changed files with 8 additions and 8 deletions

View file

@ -221,9 +221,9 @@ async function parseLoadedData(data) {
if (settings[18]) precInput.value = precOutput.value = settings[18];
if (settings[19]) options = JSON.parse(settings[19]);
// setting 16 and 17 (temperature) are part of options now
if (settings[16]) options.temperatureEquator = Number(settings[16]);
if (settings[17]) options.temperatureNorthPole = options.temperatureSouthPole = Number(settings[17]);
// setting 16 and 17 (temperature) are part of options now, kept as "" in newer versions for compatibility
if (settings[16]) options.temperatureEquator = +settings[16];
if (settings[17]) options.temperatureNorthPole = options.temperatureSouthPole = +settings[17];
if (settings[20]) mapName.value = settings[20];
if (settings[21]) hideLabels.checked = +settings[21];