devalue
devalue copied to clipboard
fix: throw error if non-POJO is an error
This pull request gives a better UX to a developer using nuxt. Right now, if an error is thrown and that cannot be stringified, the only thing shown is the error name —for example: TypeError
—. With these changes, if the thing that is being stringified is an error, instead of just showing the name, the error is re-thrown, with an extended error message.
Hey, is there any chance we can merge this pull request? 😄
+1, we just ran into this issue in Astro as well moving from serialize-javascript
, which supports this behavior by default.
+1
cc @pi0
Can this be merged? It's been almost a year now.