mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 05:22:44 +02:00
fix tryExportData
thanks @MokaStitcher
This commit is contained in:
parent
952fc8de1a
commit
ce22229ea9
@ -1378,7 +1378,7 @@ export class GameData {
|
|||||||
link.remove();
|
link.remove();
|
||||||
};
|
};
|
||||||
if (!bypassLogin && dataType < GameDataType.SETTINGS) {
|
if (!bypassLogin && dataType < GameDataType.SETTINGS) {
|
||||||
let promise: Promise<any> = Promise.resolve(null);
|
let promise: Promise<string | null> = Promise.resolve(null);
|
||||||
|
|
||||||
if (dataType === GameDataType.SYSTEM) {
|
if (dataType === GameDataType.SYSTEM) {
|
||||||
promise = pokerogueApi.savedata.system.get({ clientSessionId });
|
promise = pokerogueApi.savedata.system.get({ clientSessionId });
|
||||||
@ -1386,10 +1386,8 @@ export class GameData {
|
|||||||
promise = pokerogueApi.savedata.session.get({ slot: slotId, clientSessionId });
|
promise = pokerogueApi.savedata.session.get({ slot: slotId, clientSessionId });
|
||||||
}
|
}
|
||||||
|
|
||||||
promise
|
promise.then(response => {
|
||||||
.then(response => response.text())
|
if (!response?.length || response[0] !== "{") {
|
||||||
.then(response => {
|
|
||||||
if (!response.length || response[0] !== "{") {
|
|
||||||
console.error(response);
|
console.error(response);
|
||||||
resolve(false);
|
resolve(false);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user