Bad call to _createCollection #120

Closed
sdemjanenko opened this Issue Mar 6, 2014 · 1 comment

Projects

None yet

2 participants

@sdemjanenko
Contributor

When using the collectionType attribute for a relation the _createCollection is passed the options: {model: undefined}. The collection I linked to in collectionType already has the model set. The options then override that model and I get an error.

An ugly fix is:

data = this._createCollection(collectionType || BackboneCollection,
              relation.collectionOptions || (relatedModel ? {model: relatedModel} : {}));
@dhruvaray dhruvaray added the bug label Mar 7, 2014
@dhruvaray dhruvaray self-assigned this Mar 7, 2014
@dhruvaray dhruvaray added a commit that referenced this issue Mar 7, 2014
@dhruvaray Fix for issue #120 d0a7e0e
@dhruvaray
Owner

This should fix the problem... Let me know if it works for you.

@dhruvaray dhruvaray closed this Mar 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment