浏览代码

check for native bigint when validating input

painor 3 年之前
父节点
当前提交
2f10bfede3
共有 4 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      gramjs/Version.ts
  2. 1 1
      gramjs/tl/api.js
  3. 2 2
      package-lock.json
  4. 1 1
      package.json

+ 1 - 1
gramjs/Version.ts

@@ -1 +1 @@
-export const version = "1.7.5";
+export const version = "1.7.7";

+ 1 - 1
gramjs/tl/api.js

@@ -232,7 +232,7 @@ function compareType(value, type) {
             correct = typeof value === type;
             break;
         case "bigInt":
-            correct = bigInt.isInstance(value) || value === undefined;
+            correct = bigInt.isInstance(value) || typeof value==="bigint" || value === undefined;
             break;
         case "true":
             // true value is always correct

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "telegram",
-  "version": "1.7.6",
+  "version": "1.7.7",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "telegram",
-      "version": "1.7.6",
+      "version": "1.7.7",
       "license": "MIT",
       "dependencies": {
         "@cryptography/aes": "^0.1.1",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "telegram",
-  "version": "1.7.6",
+  "version": "1.7.7",
   "description": "NodeJS MTProto API Telegram client library,",
   "main": "index.js",
   "types": "index.d.ts",