2

Faced with such a strange problem with Backbone collection. I tried to add new elements in these way:

sortCollection.add([
        {id: "recommended", title: 'Recommend movies'},
        {id: "popular",     title: 'Popular movies'},
        {id: "watch",       title: 'Watching now'},
        {id: "add",         title: 'Last Editions'}
    ]);

But, when I tried to render it one item with id="watch" always disappeared. Furthermore, if I do console.log(sortCollection.length) there is only 3 items.

JSFiddle with my code is here - JsFiddle Sample

Thanks to @doctororange:

This issue seems to have been uncovered and solved very recently: github.com/jashkenas/backbone/issues/2719

Problem solved.

LadyBo
  • 145
  • 7

1 Answers1

1

This issue seems to have been uncovered and solved very recently

https://github.com/jashkenas/backbone/issues/2719

doctororange
  • 11,670
  • 12
  • 42
  • 58