Fixed bug, that broke UUID changer when user provides spaces in UUID. #102

Merged
bema merged 2 commits from widlam/bug/issue#101 into master 2023-03-06 15:05:53 +01:00
Showing only changes of commit c440b08bdf - Show all commits

View File

@@ -280,9 +280,10 @@ async function fetchUUIDCheck(givenUUID , strategy){
} }
function checkUUIDChars(uuid) { function checkUUIDChars(uuid) {
uuid.replace(/ /g,'')
console.log("UUID in check: " + uuid); console.log("UUID in check: " + uuid);
const regex = new RegExp("^[A-z0-9-]+$"); const regex = new RegExp("^[A-z0-9-]+$");
if(regex.test(uuid)){ if(regex.test(uuid) || uuid == ""){
return uuid ; return uuid ;
} }
return "invalid"; return "invalid";