From 94d4175464f9da56c9ec0f03df296c9e456a061e Mon Sep 17 00:00:00 2001 From: alcroito Date: Sun, 9 Jul 2023 16:36:27 +0200 Subject: [PATCH] fix(web): Fix web ui not fetching data on macOS sometimes 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. --- webclients/svelte/src/stores/DomainRecordIpChangesStore.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webclients/svelte/src/stores/DomainRecordIpChangesStore.ts b/webclients/svelte/src/stores/DomainRecordIpChangesStore.ts index e3ff090..76f75ff 100644 --- a/webclients/svelte/src/stores/DomainRecordIpChangesStore.ts +++ b/webclients/svelte/src/stores/DomainRecordIpChangesStore.ts @@ -19,7 +19,9 @@ export class DomainRecordIpChangesStore { this.query = createQuery({ 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' }); }