Closed ogonkov closed 2 years ago
@jashkenas can you look at this PR? Seems minor change
Would be nice to have this merged, because the documentation on backbonejs.org currently is inaccurate (https://backbonejs.org/#Collection-model), and it's impossible to implement polymorphic models based on attrs as of now
Edit: I got it working now by using the method described here: https://github.com/jashkenas/backbone/issues/4203#issuecomment-594086825
It's pretty ugly though.
~Already fixed, see #3966 and https://github.com/jashkenas/backbone/issues/4203#issuecomment-1003768061.~
Thanks @ogonkov!
Simple check that
this.model
is constructor. We could have more complicated check, but looks like it doesn't required.Fixes #4233