Backbone.Subset icon indicating copy to clipboard operation
Backbone.Subset copied to clipboard

Backbone.Subset does not correctly extend Backbone.Collection

Open nthsense opened this issue 12 years ago • 0 comments

If you create a new instance of a Backbone.Subset, it does not act as an instance of a Backbone.Collection:

!(mySubset instanceof Backbone.Collection) === true

This is a problem because it means you can't always substitute a Subset for a Collection. Knockback, for instance, can't make a collectionObservable around a Subset because it does an instanceof safety check.

nthsense avatar Aug 27 '13 17:08 nthsense