File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
packages/firestore/src/core Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @firebase/firestore " : patch
3+ ---
4+
5+ Fixed a regression that prevented the garbage collector from running if multi-tab was disabled.
Original file line number Diff line number Diff line change @@ -182,6 +182,15 @@ export class IndexedDbOfflineComponentProvider extends MemoryOfflineComponentPro
182182 this . onlineComponentProvider . syncEngine
183183 ) ;
184184 await fillWritePipeline ( this . onlineComponentProvider . remoteStore ) ;
185+
186+ // NOTE: This will immediately call the listener, so we make sure to
187+ // set it after localStore / remoteStore are started.
188+ await this . persistence . setPrimaryStateListener ( ( ) => {
189+ if ( this . gcScheduler && ! this . gcScheduler . started ) {
190+ this . gcScheduler . start ( this . localStore ) ;
191+ }
192+ return Promise . resolve ( ) ;
193+ } ) ;
185194 }
186195
187196 createLocalStore ( cfg : ComponentConfiguration ) : LocalStore {
You can’t perform that action at this time.
0 commit comments