Skip to content

Commit

Permalink
[PERF] Ajax should join an existing run if one exists
Browse files Browse the repository at this point in the history
  • Loading branch information
chadhietala committed Nov 20, 2015
1 parent e1007db commit 4ece826
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon/adapters/rest-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,9 @@ export default Adapter.extend(BuildURLMixin, {
);

if (response instanceof AdapterError) {
Ember.run(null, reject, response);
Ember.run.join(null, reject, response);
} else {
Ember.run(null, resolve, response);
Ember.run.join(null, resolve, response);
}
};

Expand All @@ -849,7 +849,7 @@ export default Adapter.extend(BuildURLMixin, {
}
}

Ember.run(null, reject, error);
Ember.run.join(null, reject, error);
};

Ember.$.ajax(hash);
Expand Down

0 comments on commit 4ece826

Please sign in to comment.