Closed rgant closed 8 years ago
Some of the fields in my models have the value of null. This causes an error because null doesn't have a constructor property. https://github.com/BlairAllegroTech/js-data-jsonapi/blob/d67ff61c7dff78257b416927d23e1c32c87a76e0/src/JsonApiSerializer.ts#L621
null
I think that this: if (val.constructor === ModelPlaceHolder) {
if (val.constructor === ModelPlaceHolder) {
Needs to change to this: if (val !== null && val.constructor === ModelPlaceHolder) {
if (val !== null && val.constructor === ModelPlaceHolder) {
Thanks @rgant , i appreciate the feedback!
Some of the fields in my models have the value of
null
. This causes an error becausenull
doesn't have a constructor property. https://github.com/BlairAllegroTech/js-data-jsonapi/blob/d67ff61c7dff78257b416927d23e1c32c87a76e0/src/JsonApiSerializer.ts#L621I think that this:
if (val.constructor === ModelPlaceHolder) {
Needs to change to this:
if (val !== null && val.constructor === ModelPlaceHolder) {