Check for empty string

This commit is contained in:
Vortrex
2023-03-04 23:42:56 -06:00
parent 992cc53dfd
commit ef4c64f722

View File

@@ -2316,8 +2316,10 @@ function removeHexColoursFromString(str) {
// ===========================================================================
function removeSlashesFromString(str) {
let matchRegex = /\//gi;
str.replace(matchRegex, ``);
if (str == "") {
let matchRegex = /\//gi;
str.replace(matchRegex, ``);
}
return str;
}