File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -259,12 +259,6 @@ export function useLiveQuery(
259
259
// Update status ref whenever the effect runs
260
260
setStatus ( currentCollection . status )
261
261
262
- // Clean up previous subscription
263
- if ( currentUnsubscribe ) {
264
- currentUnsubscribe ( )
265
- currentUnsubscribe = null
266
- }
267
-
268
262
// Initialize state with current collection data
269
263
state . clear ( )
270
264
for ( const [ key , value ] of currentCollection . entries ( ) ) {
@@ -305,7 +299,7 @@ export function useLiveQuery(
305
299
currentCollection . preload ( ) . catch ( console . error )
306
300
}
307
301
308
- // Cleanup when effect is invalidated
302
+ // Cleanup when computed is invalidated
309
303
onCleanup ( ( ) => {
310
304
if ( currentUnsubscribe ) {
311
305
currentUnsubscribe ( )
@@ -317,14 +311,6 @@ export function useLiveQuery(
317
311
{ name : `TanstackDBSyncComputed` }
318
312
)
319
313
320
- // Cleanup on unmount (only if we're in a component context)
321
- onCleanup ( ( ) => {
322
- if ( currentUnsubscribe ) {
323
- currentUnsubscribe ( )
324
- currentUnsubscribe = null
325
- }
326
- } )
327
-
328
314
return {
329
315
state,
330
316
data,
You can’t perform that action at this time.
0 commit comments