Skip to content

Instantly share code, notes, and snippets.

@edtoken
Last active August 29, 2015 14:05
Show Gist options
  • Save edtoken/ae30ab66334b610a3a7f to your computer and use it in GitHub Desktop.
Save edtoken/ae30ab66334b610a3a7f to your computer and use it in GitHub Desktop.
viewremove.js
var removeFunc = Backbone.View.prototype.remove;
Backbone.View.prototype.remove = function(){
if(this.children){
_.each(this.children, function(item){
item.remove();
});
}
return removeFunc.call(this, arguments);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment