Skip to content

Commit 0183e90

Browse files
fix(angular-db): resolve issue where query function was called twice inside of the computed collection object (#1252)
* fix: resolve issue where reactive params were being tracked twice inside of the computed collection This issue was causing the computed to run twice anytime a reactive param was updated. * chore: add changeset
1 parent b0276d4 commit 0183e90

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/nasty-clubs-tease.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/angular-db': minor
3+
---
4+
5+
fixing double reactive parameter tracking inside of injectLiveQuery

packages/angular-db/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export function injectLiveQuery(opts: any) {
188188
}
189189

190190
return createLiveQueryCollection({
191-
query: (q) => query({ params: currentParams, q }),
191+
query: () => result,
192192
startSync: true,
193193
gcTime: 0,
194194
})

0 commit comments

Comments
 (0)