Skip to content

Instantly share code, notes, and snippets.

@sergiors
Last active August 29, 2015 14:21
Show Gist options
  • Save sergiors/54b8f042bed1f0adc007 to your computer and use it in GitHub Desktop.
Save sergiors/54b8f042bed1f0adc007 to your computer and use it in GitHub Desktop.
Patch to work with Flux at Backbone
_.each(['Collection'], function(name) {
var collection = Backbone[name];
collection.prototype.addChangeListener = function(callback) {
this.on('all', callback)
}
collection.prototype.removeChangeListener = function(callback) {
this.off('all', callback);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment