Skip to content

Commit

Permalink
prettier to the prettier gods
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Aug 17, 2018
1 parent 6401c44 commit a1ce0e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion addon/-legacy-private/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ Store = Service.extend({
let index = this._trackedAsyncRequests.indexOf(token);

if (index === -1) {
throw new Error(`Attempted to end tracking for the following request but it was not being tracked:\n${token}`);
throw new Error(
`Attempted to end tracking for the following request but it was not being tracked:\n${token}`
);
}

this._trackedAsyncRequests.splice(index, 1);
Expand Down
8 changes: 6 additions & 2 deletions addon/-record-data-private/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,13 @@ Store = Service.extend({
this._trackAsyncRequestEnd = token => {
let index = this._trackedAsyncRequests.indexOf(token);

if (index !== -1) {
this._trackedAsyncRequests.splice(index, 1);
if (index === -1) {
throw new Error(
`Attempted to end tracking for the following request but it was not being tracked:\n${token}`
);
}

this._trackedAsyncRequests.splice(index, 1);
};

this.__asyncWaiter = () => {
Expand Down

0 comments on commit a1ce0e9

Please sign in to comment.