Open lukas1994 opened 4 years ago
interface IEditorModel { timeDimension?: TimeDimension; } const defaultEditorModel: IEditorModel = { timeDimension: undefined, }; export class EditorModel extends Record(defaultEditorModel, "EditorModel") implements IEditorModel { public constructor(values?: Partial<IEditorModel>) { super(values); } } const em = new EditorModel(); expect(em.timeDimension).toBeUndefined(); console.log(recordTransit.toJSON(em));
This code serializes timeDimension to null even though the first expect passes. Any ideas why this is happening?
timeDimension
null
expect
repro: https://codesandbox.io/s/immutablejs-t910c
This code serializes
timeDimension
tonull
even though the firstexpect
passes. Any ideas why this is happening?