Changed to ReplaceAll

This commit is contained in:
Elizabeth Cray 2022-09-08 00:17:25 +00:00
parent 2fe896abb0
commit 0627a0c853

View File

@ -24,7 +24,7 @@ const invalidChars = ['/', '\\', '>', '<', ':', '*', '|', '"', '\'', '?', '\0'];
const replaceInvalid = (str) => {
var cache = str;
invalidChars.forEach(ch => {
cache = cache.replace(ch, "#");
cache = cache.replaceAll(ch, "#");
});
return cache;
}