You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When in the Payload tab a state is expanded it fails to show the value with [destr] Invalid JSON if the value is a string representing a BigInt (a number with more than 16/17 digits). When a string representing a BigInt is in an object the entire object is not get showed due to the same destr error
The value does get showed and there isn't a destr error throwed in the console
ℹ️ Additional context
I did attempt to debug the issue myself a bit:
There is a function that checks if the value is a number with a RegExp and if it returned to be a number it gives the value to destrsafeDestr which fails to parse the value as the same "is a string with a number" check is done in destr too however with a limit of 16/17 characters, while the check before did not take that into account, making destr return this Invalid JSON error due to the number being "incompatible" with what JSON.parse due to number truncation.
The text was updated successfully, but these errors were encountered:
🐛 The bug
When in the Payload tab a state is expanded it fails to show the value with
[destr] Invalid JSON
if the value is a string representing aBigInt
(a number with more than 16/17 digits). When a string representing aBigInt
is in an object the entire object is not get showed due to the same destr error🛠️ To reproduce
https://stackblitz.com/edit/github-guforx?file=app.vue
🌈 Expected behavior
The value does get showed and there isn't a destr error throwed in the console
ℹ️ Additional context
I did attempt to debug the issue myself a bit:
There is a function that checks if the value is a number with a
RegExp
and if it returned to be a number it gives the value todestr
safeDestr
which fails to parse the value as the same "is a string with a number" check is done indestr
too however with a limit of 16/17 characters, while the check before did not take that into account, makingdestr
return thisInvalid JSON
error due to the number being "incompatible" with whatJSON.parse
due to number truncation.The text was updated successfully, but these errors were encountered: