Skip to content

Commit

Permalink
Merge pull request #3844 from bmac/bug-3629
Browse files Browse the repository at this point in the history
Remove conditional statement that is always true
  • Loading branch information
bmac committed Oct 16, 2015
2 parents 921e8c9 + 2913065 commit 188efdd
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions packages/ember-data/lib/adapters/rest-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -816,15 +816,12 @@ export default Adapter.extend(BuildURLMixin, {
var hash = adapter.ajaxOptions(url, type, options);

hash.success = function(payload, textStatus, jqXHR) {
let response;

if (!(response instanceof AdapterError)) {
response = adapter.handleResponse(
jqXHR.status,
parseResponseHeaders(jqXHR.getAllResponseHeaders()),
response || payload
);
}

let response = adapter.handleResponse(
jqXHR.status,
parseResponseHeaders(jqXHR.getAllResponseHeaders()),
payload
);

if (response instanceof AdapterError) {
Ember.run(null, reject, response);
Expand Down

0 comments on commit 188efdd

Please sign in to comment.