Skip to content

Commit e2d55e7

Browse files
fix: replace deprecated String.prototype.substr() (#445)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <[email protected]>
1 parent c837758 commit e2d55e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const find = (folder, set = [], root = true) => {
2525
if (!root) {
2626
return
2727
}
28-
return set.map(f => f.substr(folder.length + 1)
28+
return set.map(f => f.slice(folder.length + 1)
2929
.replace(/\\/g, '/'))
3030
.sort((a, b) => a.localeCompare(b))
3131
}

0 commit comments

Comments
 (0)