Skip to content

_reset is called before Collection Constructor #9

Description

@Crisfole

It may be a documentation issue, or it may be a bug, I can't tell.

Line 59 results in an error because this.models (usually set in the Backbone.Collection constructor) hasn't been set yet. I'm not 100% sure what solution to suggest (thus why it's not a pull request) since I'm not really sure if it's a bug or documentation issue. Either way it's worth fixing because this is a very handy, well written tool.

Steps to Reproduce:

coll = new Backbone.Collection([], {})
new Backbone.Subset([], {parent: coll, sieve: function(m) { return true; }})

This happens whether or not you pass in the undocumented no_reset option. If no_reset is true the error fires at line 152

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions