]> git.example.dev Git - binbsis50-sm.git/commitdiff
updated: fixed null
author2weiEmu <saalbach.robert@outlook.de>
Fri, 19 Jun 2026 14:15:36 +0000 (16:15 +0200)
committer2weiEmu <saalbach.robert@outlook.de>
Fri, 19 Jun 2026 14:15:36 +0000 (16:15 +0200)
public/js/index.js
public/js/room.js
songmanager

index 3f6721d92c17f706381461f846f4ae8b58b98569..f0c52c5d2cde0bf906487eab07a737e97703fb10 100644 (file)
@@ -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, {
index c63e8901525ab2a6942406fff2e9984d7b73443d..77525d05a9ce5fffe33458638ce872b23d2c1f00 100644 (file)
@@ -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"])
index 2f8d0909fc8bb63e1e30c8dc9c4cde6fcac1467a..8cf37388757ef3b2e66e53609eb480b946092b5b 100755 (executable)
Binary files a/songmanager and b/songmanager differ