Browse Source

chore: replace deprecated String.prototype.substr()

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Tobias Speicher 3 years ago
parent
commit
87d7bd9f34
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/util.ts

+ 1 - 1
lib/util.ts

@@ -170,7 +170,7 @@ class Util {
 	}
 
 	randomToken(): string {
-		return Math.random().toString(36).substr(2);
+		return Math.random().toString(36).slice(2);
 	}
 
 	isSecure(): boolean {