Open grahambates opened 5 years ago
Thanks for the PR @grahambates ! Looks like theres a small lint error to get the tests passing
I've fixed the lint errors and added some tests.
The failing check is due to use of the spread operator in a dependency (strong-globalize) which breaks compatibility with node 4. This is obviously unreleated to the change.
In getting my tests to work I've also fixed an issue where the serializer did not handle optional polymorphic belongsTo relationships. It would trigger an error where the discriminator value was empty because the relationship was not set. I've added a test case for this too.
Adds polymorphic support for belongsTo relationships.