mxriverlynn / backbone.picky

selectable entities as mixins for Backbone.Model and Backbone.Collection
129 stars 29 forks source link

'selected' event not always passing through the model #21

Open ronaldcurtis opened 10 years ago

ronaldcurtis commented 10 years ago

Hi Derick,

I've currently implemented backbone.picky in a marionette project and overall it's working great. However I have noticed multiple instances in which the 'selected' event is not passing through a model. I can easily get around this by checking if the model is first defined, but it would be nice if the event ALWAYS passes the selected model through.

Eg:

initialize: ->
  this.listenTo this.collection, 'selected', (selectedModel) ->
    console.log selectedModel // sometimes undefined