@@ -54,7 +54,7 @@ function _getValueProto(data: any, resource: string, valueFieldName: string) {
5454/** @internal */
5555export function createSnapshotFromProtobuf ( data : Uint8Array , path : string , databaseId : string ) {
5656 if ( ! firestoreInstance ) {
57- firestoreInstance = firestore . getFirestore ( databaseId ) ;
57+ firestoreInstance = firestore . getFirestore ( getApp ( ) , databaseId ) ;
5858 }
5959 try {
6060 const dataBuffer = Buffer . from ( data ) ;
@@ -74,7 +74,7 @@ export function createBeforeSnapshotFromProtobuf(
7474 databaseId : string
7575) {
7676 if ( ! firestoreInstance ) {
77- firestoreInstance = firestore . getFirestore ( databaseId ) ;
77+ firestoreInstance = firestore . getFirestore ( getApp ( ) , databaseId ) ;
7878 }
7979 try {
8080 const dataBuffer = Buffer . from ( data ) ;
@@ -97,7 +97,7 @@ export function createSnapshotFromJson(
9797) {
9898 if ( ! firestoreInstance ) {
9999 firestoreInstance = databaseId
100- ? firestore . getFirestore ( databaseId )
100+ ? firestore . getFirestore ( getApp ( ) , databaseId )
101101 : firestore . getFirestore ( getApp ( ) ) ;
102102 }
103103 const valueProto = _getValueProto ( data , source , "value" ) ;
@@ -122,7 +122,7 @@ export function createBeforeSnapshotFromJson(
122122) {
123123 if ( ! firestoreInstance ) {
124124 firestoreInstance = databaseId
125- ? firestore . getFirestore ( databaseId )
125+ ? firestore . getFirestore ( getApp ( ) , databaseId )
126126 : firestore . getFirestore ( getApp ( ) ) ;
127127 }
128128
0 commit comments