We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6aef6e commit da5d338Copy full SHA for da5d338
src/parser/deserializer.ts
@@ -349,9 +349,8 @@ function deserializeObject(
349
const long = new Long(lowBits, highBits);
350
if (useBigInt64) {
351
value = dataview.getBigInt64(0, true);
352
- }
353
- // Promote the long if possible
354
- else if (promoteLongs && promoteValues === true) {
+ } else if (promoteLongs && promoteValues === true) {
+ // Promote the long if possible
355
value =
356
long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG)
357
? long.toNumber()
0 commit comments