@@ -54,7 +54,7 @@ function _getValueProto(data: any, resource: string, valueFieldName: string) {
54
54
/** @internal */
55
55
export function createSnapshotFromProtobuf ( data : Uint8Array , path : string , databaseId : string ) {
56
56
if ( ! firestoreInstance ) {
57
- firestoreInstance = firestore . getFirestore ( databaseId ) ;
57
+ firestoreInstance = firestore . getFirestore ( getApp ( ) , databaseId ) ;
58
58
}
59
59
try {
60
60
const dataBuffer = Buffer . from ( data ) ;
@@ -74,7 +74,7 @@ export function createBeforeSnapshotFromProtobuf(
74
74
databaseId : string
75
75
) {
76
76
if ( ! firestoreInstance ) {
77
- firestoreInstance = firestore . getFirestore ( databaseId ) ;
77
+ firestoreInstance = firestore . getFirestore ( getApp ( ) , databaseId ) ;
78
78
}
79
79
try {
80
80
const dataBuffer = Buffer . from ( data ) ;
@@ -97,7 +97,7 @@ export function createSnapshotFromJson(
97
97
) {
98
98
if ( ! firestoreInstance ) {
99
99
firestoreInstance = databaseId
100
- ? firestore . getFirestore ( databaseId )
100
+ ? firestore . getFirestore ( getApp ( ) , databaseId )
101
101
: firestore . getFirestore ( getApp ( ) ) ;
102
102
}
103
103
const valueProto = _getValueProto ( data , source , "value" ) ;
@@ -122,7 +122,7 @@ export function createBeforeSnapshotFromJson(
122
122
) {
123
123
if ( ! firestoreInstance ) {
124
124
firestoreInstance = databaseId
125
- ? firestore . getFirestore ( databaseId )
125
+ ? firestore . getFirestore ( getApp ( ) , databaseId )
126
126
: firestore . getFirestore ( getApp ( ) ) ;
127
127
}
128
128
0 commit comments