Skip to content

Commit

Permalink
[Discover] Changes to abort logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Aug 10, 2023
1 parent a57eafa commit 5d10203
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,18 +228,18 @@ export function getDataStateContainer({
useNewFieldsApi: !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE),
};

abortController?.abort();
abortControllerFetchMore?.abort();

if (options.fetchMore) {
abortControllerFetchMore?.abort();
abortControllerFetchMore = new AbortController();

await fetchMoreDocuments(dataSubjects, {
abortController: abortControllerFetchMore,
...commonFetchDeps,
});
return;
}

abortController?.abort();
abortController = new AbortController();
const prevAutoRefreshDone = autoRefreshDone;

Expand Down

0 comments on commit 5d10203

Please sign in to comment.