diff --git a/mods/save_loading.js b/mods/save_loading.js index 969ea5a4..6bbeb016 100644 --- a/mods/save_loading.js +++ b/mods/save_loading.js @@ -58,7 +58,10 @@ function formatCurrentDate() { //derived from https://gist.github.com/Ivlyth/c49 function savePrompt() { var filename = prompt("Please enter the desired filename, without the .json (defaults to current date)"); if(filename === null) { - filename = `Sandboxels save ${formatCurrentDate()}`; + return false; + }; + if(filename === "") { + filename = `Sandboxels save ${formatCurrentDate()}`; }; filename += ".json"; downloadSave(filename) @@ -226,4 +229,4 @@ elements.save_loader = { excludeRandom: true, color: "#FFFFFF", desc: saveLoaderDescription, -} \ No newline at end of file +}