File tree 1 file changed +5
-5
lines changed
packages/firestore/src/api 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -649,7 +649,7 @@ export class Firestore
649
649
650
650
batch ( ) : PublicWriteBatch {
651
651
this . _ensureClientConfigured ( ) ;
652
- return new WriteBatch ( this , this . _firestoreClient ! ) ;
652
+ return new WriteBatch ( this ) ;
653
653
}
654
654
655
655
// Visible for testing.
@@ -814,11 +814,11 @@ export class Transaction implements PublicTransaction {
814
814
export class WriteBatch implements PublicWriteBatch {
815
815
private _mutations = [ ] as Mutation [ ] ;
816
816
private _committed = false ;
817
+ private _firestoreClient : FirestoreClient ;
817
818
818
- constructor (
819
- private _firestore : Firestore ,
820
- private _firestoreClient : FirestoreClient
821
- ) { }
819
+ constructor ( private _firestore : Firestore ) {
820
+ this . _firestoreClient = _firestore . _ensureClientConfigured ( ) ;
821
+ }
822
822
823
823
set < T > (
824
824
documentRef : DocumentReference < T > ,
You can’t perform that action at this time.
0 commit comments