upload old saved styles

This commit is contained in:
Azgaar 2022-02-06 01:20:08 +03:00
parent 37598994cb
commit 70b1086c50
2 changed files with 11 additions and 1 deletions

View file

@ -929,6 +929,16 @@ function parseLoadedData(data) {
if (layerIsOn("markers")) drawMarkers();
}
}
if (version < 1.72) {
const storedStyles = Object.keys(localStorage).filter(key => key.startsWith("style"));
storedStyles.forEach(styleName => {
const style = localStorage.getItem(styleName);
const newStyleName = styleName.replace(/^style/, customPresetPrefix);
localStorage.setItem(newStyleName, style);
localStorage.removeItem(styleName);
});
}
})();
void (function checkDataIntegrity() {