mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-05 10:01:24 +01:00
fix
This commit is contained in:
parent
0bca8c46f6
commit
103153ed86
2 changed files with 9 additions and 9 deletions
|
|
@ -14,7 +14,7 @@ async function saveMap(method) {
|
|||
if (method === "dropbox") saveToDropbox(mapData, filename);
|
||||
} catch (error) {
|
||||
ERROR && console.error(error);
|
||||
await window.ServerAPI.postData("api/catch-error.json", error, {point: "saveMap", timestamp: Date.now()});
|
||||
window.ServerAPI.postData("api/catch-error.json", error.toString(), {point: "saveMap", timestamp: Date.now()});
|
||||
alertMessage.innerHTML = /* html */ `An error is occured on map saving. If the issue persists, please copy the message below and report it on ${link(
|
||||
"https://github.com/Azgaar/Fantasy-Map-Generator/issues",
|
||||
"GitHub"
|
||||
|
|
@ -168,7 +168,7 @@ function prepareMapData() {
|
|||
async function saveToStorage(mapData, showTip = false) {
|
||||
const blob = new Blob([mapData], { type: "text/plain" });
|
||||
await ldb.set("lastMap", blob);
|
||||
await window.ServerAPI.postData("api/load-map.json", blob, {showTip: showTip});
|
||||
window.ServerAPI.postData("api/load-map.json", blob, {showTip: showTip});
|
||||
showTip && tip("Map is saved to the browser storage", false, "success");
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ async function initiateAutosave() {
|
|||
lastSavedAt = Date.now();
|
||||
} catch (error) {
|
||||
ERROR && console.error(error);
|
||||
await window.ServerAPI.postData("api/catch-error.json", error, {point: "initiateAutosave", timestamp: Date.now()});
|
||||
window.ServerAPI.postData("api/catch-error.json", error.toString(), {point: "initiateAutosave", timestamp: Date.now()});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue