Skip to content

Commit

Permalink
chore: replace deprecated String.prototype.substr()
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 <[email protected]>
  • Loading branch information
CommanderRoot authored and jonasgloning committed May 5, 2022
1 parent 82b8c71 commit 87d7bd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class Util {
}

randomToken(): string {
return Math.random().toString(36).substr(2);
return Math.random().toString(36).slice(2);
}

isSecure(): boolean {
Expand Down

0 comments on commit 87d7bd9

Please sign in to comment.