Skip to content

Commit

Permalink
Add check for another form of AbortError
Browse files Browse the repository at this point in the history
This fixes test failures such as this one:
https://app.circleci.com/pipelines/github/hashicorp/nomad/14501/workflows/01177cd9-a2ae-4fff-94ef-6b109b778123/jobs/134238#failed-test-54

One of the nested dependencies must have changed but I wasn’t
able to track it down. 😖
  • Loading branch information
backspace committed Jan 28, 2021
1 parent 5522229 commit 9ee5c96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/app/adapters/watchable.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class Watchable extends ApplicationAdapter {
signal,
data: params,
}).catch(error => {
if (error instanceof AbortError) {
if (error instanceof AbortError || error.name == 'AbortError') {
return;
}
throw error;
Expand Down Expand Up @@ -149,7 +149,7 @@ export default class Watchable extends ApplicationAdapter {
store.push(normalizedData);
},
error => {
if (error instanceof AbortError) {
if (error instanceof AbortError || error.name === 'AbortError') {
return relationship.kind === 'belongsTo' ? {} : [];
}
throw error;
Expand Down

0 comments on commit 9ee5c96

Please sign in to comment.