backbone.trackit icon indicating copy to clipboard operation
backbone.trackit copied to clipboard

Reset tracking before calling callback on model in save method

Open kirach opened this issue 10 years ago • 0 comments

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.

kirach avatar Nov 21 '14 11:11 kirach