File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -174,11 +174,20 @@ export class Provider<T extends Name> {
174
174
...services
175
175
. filter ( service => 'INTERNAL' in service ) // legacy services
176
176
// eslint-disable-next-line @typescript-eslint/no-explicit-any
177
- . map ( service => ( service as any ) . INTERNAL ! . delete ( ) )
178
- // ...services
179
- // .filter(service => 'delete' in service) // next services
180
- // // eslint-disable-next-line @typescript-eslint/no-explicit-any
181
- // .map(service => (service as any).delete())
177
+ . map ( service => ( service as any ) . INTERNAL ! . delete ( ) ) ,
178
+ ...services
179
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
180
+ . filter (
181
+ service =>
182
+ 'delete' in service &&
183
+ this . component &&
184
+ // TODO: remove !== 'app' when modular SDKs become official
185
+ // People call app.delete() to trigger provider.delete() for all registered components, so
186
+ // we don't call delete() on legacy FirebaseApp to avoid getting into a loop.
187
+ ( this . component . name as any ) !== 'app'
188
+ ) // modular services
189
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
190
+ . map ( service => ( service as any ) . delete ( ) )
182
191
] ) ;
183
192
}
184
193
You can’t perform that action at this time.
0 commit comments