MatrixAI / js-errors

Error handling with error chaining
https://polykey.com
Apache License 2.0
0 stars 0 forks source link

Fix for potentially undefined `cause` property in `fromJSON` #3

Closed emmacasolin closed 2 years ago

emmacasolin commented 2 years ago

Description

Since the JSON replacer function removes undefined values, it is incorrect to assume that the cause property will always exist in a serialised AbstractError. Thus, this was removed from the checking done in fromJSON.

Tasks

Final checklist