Skip to content

Commit

Permalink
fix: replace deprecated String.prototype.substr() (#445)
Browse files Browse the repository at this point in the history
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
  • Loading branch information
CommanderRoot committed Apr 5, 2022
1 parent c837758 commit e2d55e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/map.js
Expand Up @@ -25,7 +25,7 @@ const find = (folder, set = [], root = true) => {
if (!root) {
return
}
return set.map(f => f.substr(folder.length + 1)
return set.map(f => f.slice(folder.length + 1)
.replace(/\\/g, '/'))
.sort((a, b) => a.localeCompare(b))
}
Expand Down

0 comments on commit e2d55e7

Please sign in to comment.