Преглед на файлове

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;
             correct = typeof value === type;
             break;
             break;
         case "bigInt":
         case "bigInt":
-            correct = bigInt.isInstance(value) || value === undefined;
+            correct = bigInt.isInstance(value) || typeof value==="bigint" || value === undefined;
             break;
             break;
         case "true":
         case "true":
             // true value is always correct
             // true value is always correct

+ 2 - 2
package-lock.json

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

+ 1 - 1
package.json

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