Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 (synced-prefs) fix bulk-reading not working in import modal #3460

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading