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

This commit is contained in:
2023-03-06 12:35:29 +01:00
parent a3d781f477
commit c440b08bdf

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";