Back up save before migrating

This commit is contained in:
Tobias Berger 2021-09-30 14:18:43 +02:00
parent 1314ce95a6
commit 61b4f4b06d

View file

@ -63,6 +63,10 @@ export class SaveHandler extends StaticClass {
const migrators = SaveHandler.migrators.slice(saveVersion);
if (migrators.length > 0 && localSave !== null) {
localStorage.setItem(SaveHandler.saveName + "-backup", localSave);
}
let save = loadedSave;
for (let i = 0; i < migrators.length; i++) {
console.debug(