Skip to content

Commit

Permalink
chore(refactor): replace deprecated String.prototype.substr() (#213)
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 Mar 28, 2022
1 parent b14378c commit 0a7fdda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -78,7 +78,7 @@ const getAllPrefixes = function () {
for (let i = 0; i < prefixes.length; i++) {
if (typeof prefixes[i] !== 'undefined') {
for (let d = 0; d < drives.length; d += 1) {
prefix = drives[d] + prefixes[i].substr(1)
prefix = drives[d] + prefixes[i].slice(1)
if (result.indexOf(prefix) === -1) {
result.push(prefix)
}
Expand Down

0 comments on commit 0a7fdda

Please sign in to comment.