fix: Payload tab not showing bigints values
đ 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 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
đ ī¸ 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 to destr safeDestr 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.