Fix errors when loading empty slots in local mode

pull/16/head
Flashfyre 2024-03-15 15:56:07 -04:00
parent 00255cb09a
commit 7946938828
1 changed files with 7 additions and 2 deletions

View File

@ -521,8 +521,13 @@ export class GameData {
await handleSessionData(response);
});
} else
await handleSessionData(atob(localStorage.getItem(`sessionData${slotId ? slotId : ''}`)));
} else {
const sessionData = localStorage.getItem(`sessionData${slotId ? slotId : ''}`);
if (sessionData)
await handleSessionData(atob(sessionData));
else
return resolve(null);
}
});
}