Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backbone.dualstorage.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ dualsync = (method, model, options) ->
# remoteOptions.error = (resp) ->

# after localsync loads, check to see if we should still remotesync
options.ignoreCallbacks = false
options.success = (resp) ->
# first fire the success callback which will populate the model
success(resp)
Expand All @@ -222,7 +221,8 @@ dualsync = (method, model, options) ->
if _.isUndefined(model.shouldRemoteSync) or (_.isFunction(model.shouldRemoteSync) and model.shouldRemoteSync())
onlineSync(method, model, remoteOptions)

localsync(method, model, options)
optionsWithCallbacks = _(options).chain().clone().extend(ignoreCallbacks: false).value()
localsync(method, model, optionsWithCallbacks)

when 'create'
options.success = (resp, status, xhr) ->
Expand Down