Fix errors when loading empty slots in local mode
This commit is contained in:
parent
00255cb09a
commit
7946938828
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue