Skip to content

Commit

Permalink
fix(web): Fix web ui not fetching data on macOS sometimes
Browse files Browse the repository at this point in the history
Apparently there's a bug in Chrome on macOS that the browser
reports that there is no internet connectivity, and this prevents
svelte-query from fetching results.

Fix it by trying to fetch results at least once when there is no
network connectivity.
  • Loading branch information
alcroito committed Sep 24, 2023
1 parent 96e3dfd commit 94d4175
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webclients/svelte/src/stores/DomainRecordIpChangesStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export class DomainRecordIpChangesStore {
this.query = createQuery<DomainRecordIpChanges, DomainRecordIpChangesError>({
queryKey: ['domain_record_ip_changes'],
queryFn: this.queryFn,
retry: 1
retry: 1,
// Avoid macOS + Chrome offline bug https://github.com/TanStack/query/issues/5679
networkMode: 'offlineFirst'
});
}

Expand Down

0 comments on commit 94d4175

Please sign in to comment.