Last active
August 29, 2015 14:21
-
-
Save sergiors/54b8f042bed1f0adc007 to your computer and use it in GitHub Desktop.
Patch to work with Flux at Backbone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.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