浏览代码

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 年之前
父节点
当前提交
87d7bd9f34
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 {