@@ -47,10 +47,7 @@ type SuspenseCollectionEntry = {
4747 removeStatusListeners : ( ) => void
4848}
4949
50- const unscopedSuspenseCollections = new Map <
51- string ,
52- SuspenseCollectionEntry
53- > ( )
50+ const unscopedSuspenseCollections = new Map < string , SuspenseCollectionEntry > ( )
5451const suspenseCollectionsByClient = new WeakMap <
5552 DbClient ,
5653 Map < string , SuspenseCollectionEntry >
@@ -197,12 +194,14 @@ function getCurrentTime(): number {
197194function getWarningCallsite ( stackIndex : number ) : string {
198195 const stack = new Error ( ) . stack ?? `unknown`
199196 const lines = stack . split ( `\n` )
200- const userFrame = lines . slice ( 1 ) . find (
201- ( line ) =>
202- ! line . includes ( `useLiveQuery.ts` ) &&
203- ! line . includes ( `useLiveSuspenseQuery.ts` ) &&
204- ! line . includes ( `useLiveInfiniteQuery.ts` ) ,
205- )
197+ const userFrame = lines
198+ . slice ( 1 )
199+ . find (
200+ ( line ) =>
201+ ! line . includes ( `useLiveQuery.ts` ) &&
202+ ! line . includes ( `useLiveSuspenseQuery.ts` ) &&
203+ ! line . includes ( `useLiveInfiniteQuery.ts` ) ,
204+ )
206205 return userFrame ?. trim ( ) ?? lines [ stackIndex ] ?. trim ( ) ?? stack
207206}
208207
@@ -873,7 +872,8 @@ function useLiveQueryImpl(
873872 const suspenseEntry = suspenseKey
874873 ? suspenseCollections ?. get ( suspenseKey )
875874 : undefined
876- if ( suspenseConsumerId ) suspenseEntry ?. pendingConsumers . add ( suspenseConsumerId )
875+ if ( suspenseConsumerId )
876+ suspenseEntry ?. pendingConsumers . add ( suspenseConsumerId )
877877 const suspenseCollection = suspenseEntry ?. collection
878878
879879 const identityChanged =
@@ -936,14 +936,12 @@ function useLiveQueryImpl(
936936 ) as SuspenseCollection
937937 if ( suspenseCollections && suspenseKey && suspenseConsumerId ) {
938938 const collection = collectionRef . current
939- const removeCleanupListener = collection . on (
940- `status:cleaned-up` ,
941- ( ) =>
942- releaseSuspenseCollection (
943- suspenseCollections ,
944- suspenseKey ,
945- collection ,
946- ) ,
939+ const removeCleanupListener = collection . on ( `status:cleaned-up` , ( ) =>
940+ releaseSuspenseCollection (
941+ suspenseCollections ,
942+ suspenseKey ,
943+ collection ,
944+ ) ,
947945 )
948946 const removeErrorListener = collection . on ( `status:error` , ( ) => {
949947 // Keep the failed collection through React's immediate retry so
0 commit comments