Back up save before migrating
This commit is contained in:
parent
1314ce95a6
commit
61b4f4b06d
1 changed files with 4 additions and 0 deletions
|
@ -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(
|
||||
|
|
Reference in a new issue