Skip to content

Commit

Permalink
🐛 (synced-prefs) fix bulk-reading not working in import modal
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis committed Sep 17, 2024
1 parent 17fd068 commit 4c3306d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/desktop-client/src/hooks/useSyncedPrefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function useSyncedPrefs(): [SyncedPrefs, SetSyncedPrefsAction] {

const prefs = useMemo<SyncedPrefs>(
() =>
queryData.reduce(
(queryData ?? []).reduce(
(carry, { id, value }) => ({
...carry,
[id]: value,
Expand Down
2 changes: 1 addition & 1 deletion packages/loot-core/src/client/query-hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function useQuery<Response = unknown>(
makeQuery: () => Query,
deps: DependencyList,
): {
data: Response;
data: null | Response;
overrideData: (newData: Response) => void;
isLoading: boolean;
} {
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3460.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MatisJanis]
---

SyncedPrefs: fix import prefs not reading correctly.

0 comments on commit 4c3306d

Please sign in to comment.