Changed to ReplaceAll

This commit is contained in:
Elizabeth Cray 2022-09-08 00:17:25 +00:00
parent 2fe896abb0
commit 0627a0c853
1 changed files with 1 additions and 1 deletions

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