Skip to content

Commit

Permalink
fix: update the missed lite.module.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
robertIsaac committed Feb 26, 2024
1 parent 64b6a64 commit 508d07a
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/firestore/lite/lite.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { InjectionToken, Injector, ModuleWithProviders, NgModule, NgZone, Optional } from '@angular/core';
import {
EnvironmentProviders,
InjectionToken,
Injector,
NgModule,
NgZone,
Optional,
makeEnvironmentProviders,
} from '@angular/core';
import { VERSION, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵgetDefaultInstanceOf } from '@angular/fire';
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
import { AuthInstances } from '@angular/fire/auth';
Expand Down Expand Up @@ -48,10 +56,13 @@ export class FirestoreModule {
}
}

export function provideFirestore(fn: (injector: Injector) => FirebaseFirestore, ...deps: any[]): ModuleWithProviders<FirestoreModule> {
return {
ngModule: FirestoreModule,
providers: [{
export function provideFirestore(fn: (injector: Injector) => FirebaseFirestore, ...deps: any[]): EnvironmentProviders {
registerVersion('angularfire', VERSION.full, 'lite');

return makeEnvironmentProviders([
DEFAULT_FIRESTORE_INSTANCE_PROVIDER,
FIRESTORE_INSTANCES_PROVIDER,
{
provide: PROVIDED_FIRESTORE_INSTANCES,
useFactory: firestoreInstanceFactory(fn),
multi: true,
Expand All @@ -65,6 +76,6 @@ export function provideFirestore(fn: (injector: Injector) => FirebaseFirestore,
[new Optional(), ɵAppCheckInstances ],
...deps,
]
}]
};
}
]);
}

0 comments on commit 508d07a

Please sign in to comment.