ts_serialize
ts_serialize copied to clipboard
[BUG] - Nested objects cannot be serialized if they are set to null
Describe the bug Any nested object that is also a class cannot be serialized if it is set to null. When set to undefined, it can serialize properly, but not with null.
To Reproduce Steps to reproduce the behaviour:
- Create an class (A) with another class (B) as a field
- Create the class
- Set the field to null
- Attempt to use .tsSerialize() or JSON.stringify or toJSON()
- See error
Expected behaviour The primitive "null" is chosen as the serialization value.
Desktop (please complete the following information):
- OS: MacOS, linux
- Browser: FIrefox + chrome
- Version 2.0.3