Skip to content

Commit

Permalink
Fixed response
Browse files Browse the repository at this point in the history
  • Loading branch information
alekseykulikov committed Dec 14, 2012
1 parent 77afbcc commit 4ea3fd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/backbone_offline.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/backbone_offline.coffee
Expand Up @@ -18,7 +18,7 @@ do (global = window, _, Backbone) ->
when 'update' then store.update(model, options)
when 'delete' then store.destroy(model, options)

if resp then options.success() else options.error?('Record not found')
if resp then options.success(resp.attributes ? resp) else options.error?('Record not found')

# Overrides default 'Backbone.sync'. It checks 'storage' property of the model or collection
# and then delegates to 'Offline.localSync' when property exists else calls the default 'Backbone.sync' with received params.
Expand Down

0 comments on commit 4ea3fd2

Please sign in to comment.