Skip to content

Commit

Permalink
Allow empty response
Browse files Browse the repository at this point in the history
fixes #104
  • Loading branch information
kriszyp committed Apr 16, 2015
1 parent 843c287 commit a5d7957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ define([
event.beforeId = options.beforeId;
}

var result = event.target = store._restore(store.parse(response), true) || object;
var result = event.target = response && store._restore(store.parse(response), true) || object;

when(initialResponse.response, function (httpResponse) {
store.emit(httpResponse.status === 201 ? 'add' : 'update', event);
Expand Down

0 comments on commit a5d7957

Please sign in to comment.