Skip to content
Open
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
3 changes: 3 additions & 0 deletions packages/svelte-db/src/useLiveQuery.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ export function useLiveQuery(
// Subscribe to collection changes with granular updates
const subscription = currentCollection.subscribeChanges(
(changes: Array<ChangeMessage<any>>) => {
// avoids state_unsafe_mutation
await tick()

// Apply each change individually to the reactive state
untrack(() => {
for (const change of changes) {
Expand Down