backbone.trackit
backbone.trackit copied to clipboard
Reset tracking before calling callback on model in save method
Model tracking should be reset before calling old success
callback during save method. For now, this example from documentation doesn't work:
model.save({}, {
success: function() {
console.log(model.unsavedAttributes()); // >> false
}
});
because we call success and then reset tracking. This PR solve this problem.
Thanks.