Skip to content
This repository was archived by the owner on Apr 22, 2021. It is now read-only.
This repository was archived by the owner on Apr 22, 2021. It is now read-only.

Setting Collection.model to a factory function subtly breaks when Model.idAttribute is set #57

Description

@apaleslimghost

Collection#set uses this.model.prototype.idAttribute to test if it can update models in place. If this.model is actually a factory function wrapping Model.create, then this.model.prototype.idAttribute is undefined, so set decides to remove every model then add them back. This causes a race condition in my ListView, and it trashes everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions