From: 2weiEmu Date: Fri, 19 Jun 2026 14:15:36 +0000 (+0200) Subject: updated: fixed null X-Git-Url: https://git.saalbach.dev/?a=commitdiff_plain;h=993148004f66d9f11f85bbc0fa136ad1f24dfcb0;p=binbsis50-sm.git updated: fixed null --- diff --git a/public/js/index.js b/public/js/index.js index 3f6721d..f0c52c5 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -16,6 +16,8 @@ let songFileFilterName = document.getElementById("songFileFilterName") async function renameSongFile(songFileName) { let newSongFileName = prompt("What is the new file name you want?", songFileName) + + if (newSongFileName == null) { return } // this means they cancelled // TODO: make some kind of check that it's a valid URL // let response = await fetch("/api/files/rename/" + songFileName + "/" + newSongFileName, { diff --git a/public/js/room.js b/public/js/room.js index c63e890..77525d0 100644 --- a/public/js/room.js +++ b/public/js/room.js @@ -24,6 +24,8 @@ let createRoomButton = document.getElementById("createRoomButton") async function createRoomWithName() { let name = prompt("Name the room") + if (name == null) { return } // this means they cancelled + let response = await fetch("/api/rooms/add/" + name, { method: "PUT", body: JSON.stringify(["0"]) diff --git a/songmanager b/songmanager index 2f8d090..8cf3738 100755 Binary files a/songmanager and b/songmanager differ