I am building an application with Backbone and RequireJS and I am incredibly confused by the behavior of the Collection.findWhere()Backbone function here .
When the code is this:
var myId = 1;
var subList = parentList.findWhere({id: myId});
subList is displayed as undefined.
When the code is this:
var subList = parentList.findWhere({id: 1});
subList contains the correct model.
Does anyone know what can do this?
source
share