Skip to content

Commit

Permalink
Merge pull request #3943 from chadhietala/join-successes
Browse files Browse the repository at this point in the history
[PERF] Ajax should join an existing run if one exists
  • Loading branch information
bmac committed Nov 20, 2015
2 parents 6ab1756 + 4ece826 commit 15bb4b2
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 15bb4b2

Please sign in to comment.