Skip to content

Conversation

@spruce
Copy link

@spruce spruce commented Jan 26, 2020

I'm using classes for my models. Which means that the function lodash.isPlainObject returns false. Even if it should serialize the relationship.

I changed this

return Array.isArray(obj) || isPlainObject(obj);

to return Array.isArray(obj) || isObjectLike(obj); which yields the correct results for me.
To make sure it keeps working I copied existing tests using plain object to use classes instead. They where failing before my fix and now work.

@michDostal
Copy link

I would like to ask if there is any chance this will be merged and released. Due to this bug I have to deploy from local (with edited serializer-utils) instead of using CI/CD. Thanks

@VincentHardouin
Copy link

Hey, we need this also on https://github.com/1024pix/pix. This is possible to merge ? If you need help you could add me to maintainer. I could review PR and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants