Changed to ReplaceAll
This commit is contained in:
parent
2fe896abb0
commit
0627a0c853
2
index.js
2
index.js
@ -24,7 +24,7 @@ const invalidChars = ['/', '\\', '>', '<', ':', '*', '|', '"', '\'', '?', '\0'];
|
|||||||
const replaceInvalid = (str) => {
|
const replaceInvalid = (str) => {
|
||||||
var cache = str;
|
var cache = str;
|
||||||
invalidChars.forEach(ch => {
|
invalidChars.forEach(ch => {
|
||||||
cache = cache.replace(ch, "#");
|
cache = cache.replaceAll(ch, "#");
|
||||||
});
|
});
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user