Skip to content

Commit 3b89b0c

Browse files
committed
feat: remove extra clean-up.
1 parent 0a309f0 commit 3b89b0c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/solid-db/src/useLiveQuery.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,6 @@ export function useLiveQuery(
259259
// Update status ref whenever the effect runs
260260
setStatus(currentCollection.status)
261261

262-
// Clean up previous subscription
263-
if (currentUnsubscribe) {
264-
currentUnsubscribe()
265-
currentUnsubscribe = null
266-
}
267-
268262
// Initialize state with current collection data
269263
state.clear()
270264
for (const [key, value] of currentCollection.entries()) {
@@ -305,7 +299,7 @@ export function useLiveQuery(
305299
currentCollection.preload().catch(console.error)
306300
}
307301

308-
// Cleanup when effect is invalidated
302+
// Cleanup when computed is invalidated
309303
onCleanup(() => {
310304
if (currentUnsubscribe) {
311305
currentUnsubscribe()

0 commit comments

Comments
 (0)