Skip to content

Commit

Permalink
update to support patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitkapoor committed Dec 3, 2013
1 parent 899c573 commit 758ba80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backbone.trackit.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
// ------------------

_.extend(Backbone.Model.prototype, {

unsaved: {},
_trackingChanges: false,
_originalAttrs: {},
Expand Down Expand Up @@ -175,7 +175,7 @@
Backbone.sync = _.wrap(Backbone.sync, function(oldSync, method, model, options) {
options || (options = {});

if (method == 'update' || method == 'create') {
if (method == 'update' || method == 'create' || method == 'patch') {
options.success = _.wrap(options.success, _.bind(function(oldSuccess, data, textStatus, jqXHR) {
var ret;
if (oldSuccess) ret = oldSuccess.call(this, data, textStatus, jqXHR);
Expand Down

0 comments on commit 758ba80

Please sign in to comment.