graphiti
graphiti copied to clipboard
Consistent behaviour for empty polymorphic
This is just a small issue, but I would expect
self.polymorphic = []
to behave the same as no assignment at all. Instead, the behaviour changes, since the Polymorphism
module is included (in Graphiti::Resource::Configuration
)
Would happily merge a PR for this!
I'm not sure what the correct thing here should be, the obvious thing would be to avoid loading Polymorphism
in the assignment when the array is empty, but I imagine it could become empty later (or conversely, become non-empty by some other means), so it seems that the behaviour should be modified elsewhere