Closed mittsh closed 9 years ago
When defaults set the value as an empty collection, it was using the collection as the only item of a new collection, e.g.:
defaults
Book = Backbone.Model.extend({ relations: { author: Author, pages: Backbone.Collection }, defaults: { author: new Author(), pages: new Backbone.Collection() } });
What we expect is that the empty collection is kept.
Adding unit tests for that in defaults.js, passing now, breaking before this change.
defaults.js
Thx for the pull req, released in v2.0.2
@blittle :+1: awesome!
When
defaults
set the value as an empty collection, it was using the collection as the only item of a new collection, e.g.:What we expect is that the empty collection is kept.
Adding unit tests for that in
defaults.js
, passing now, breaking before this change.