Browse files

Backbone.sync success+error arguments fixed to match updated Backbone…

….js Model.save
  • Loading branch information...
1 parent 07d30f6 commit de5d30a7b1e74c7dce218b9055aae8f33b13b2dd @dmix dmix committed Jan 3, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 backbone.localStorage.js
View
6 backbone.localStorage.js
@@ -66,7 +66,7 @@ _.extend(Store.prototype, {
// Override `Backbone.sync` to use delegate to the model or collection's
// *localStorage* property, which should be an instance of `Store`.
-Backbone.sync = function(method, model, success, error) {
+Backbone.sync = function(method, model, options) {
var resp;
var store = model.localStorage || model.collection.localStorage;
@@ -79,8 +79,8 @@ Backbone.sync = function(method, model, success, error) {
}
if (resp) {
- success(resp);
+ options.success(resp);
} else {
- error("Record not found");
+ options.error("Record not found");
}
};

0 comments on commit de5d30a

Please sign in to comment.