fix: use replace instead of replaceAll to support pre-Node16

This commit is contained in:
NGPixel 2021-12-06 14:01:26 -05:00
parent 003ca51826
commit 5173c4802e
No known key found for this signature in database
GPG Key ID: 8FDA2F1757F60D63

View File

@ -35,7 +35,7 @@ module.exports = {
rawPath = rawPath.replace(unsafeCharsRegex, '') rawPath = rawPath.replace(unsafeCharsRegex, '')
if (rawPath === '') { rawPath = 'home' } if (rawPath === '') { rawPath = 'home' }
rawPath = rawPath.replaceAll('\\', '').replaceAll('//', '').replaceAll(/\.\.+/ig, '') rawPath = rawPath.replace(/\\/g, '').replace(/\/\//g, '').replace(/\.\.+/ig, '')
// Extract Info // Extract Info
let pathParts = _.filter(_.split(rawPath, '/'), p => { let pathParts = _.filter(_.split(rawPath, '/'), p => {