File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { FirebaseFirestore, Settings } from './database';
22
22
import { DatabaseId , DatabaseInfo } from '../../../src/core/database_info' ;
23
23
import { logDebug } from '../../../src/util/log' ;
24
24
import { Code , FirestoreError } from '../../../src/util/error' ;
25
+ import { FirestoreSettings } from '../../../src/api/database' ;
25
26
26
27
export const LOG_TAG = 'ComponentProvider' ;
27
28
@@ -87,14 +88,14 @@ export function removeComponents(firestore: FirebaseFirestore): void {
87
88
export function makeDatabaseInfo (
88
89
databaseId : DatabaseId ,
89
90
persistenceKey : string ,
90
- settings : Settings
91
+ settings : FirestoreSettings
91
92
) : DatabaseInfo {
92
93
return new DatabaseInfo (
93
94
databaseId ,
94
95
persistenceKey ,
95
- settings . host ?? DEFAULT_HOST ,
96
- settings . ssl ?? DEFAULT_SSL ,
97
- /* forceLongPolling= */ false ,
98
- /* forceAutoDetectLongPolling= */ true
96
+ settings . host ,
97
+ settings . ssl ,
98
+ settings . experimentalForceLongPolling ,
99
+ settings . experimentalAutoDetectLongPolling
99
100
) ;
100
101
}
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ import {
154
154
LRU_DEFAULT_CACHE_SIZE_BYTES ,
155
155
LRU_MINIMUM_CACHE_SIZE_BYTES
156
156
} from '../local/lru_garbage_collector' ;
157
+ import { makeDatabaseInfo } from '../../lite/src/api/components' ;
157
158
158
159
// settings() defaults:
159
160
const DEFAULT_HOST = 'firestore.googleapis.com' ;
@@ -662,13 +663,10 @@ export function configureFirestore(firestore: FirestoreCompat): void {
662
663
'configureFirestore() called multiple times'
663
664
) ;
664
665
665
- const databaseInfo = new DatabaseInfo (
666
+ const databaseInfo = makeDatabaseInfo (
666
667
firestore . _databaseId ,
667
668
firestore . _persistenceKey ,
668
- settings . host ,
669
- settings . ssl ,
670
- settings . experimentalForceLongPolling ,
671
- settings . experimentalAutoDetectLongPolling
669
+ settings
672
670
) ;
673
671
firestore . _firestoreClient = new FirestoreClient (
674
672
firestore . _credentials ,
You can’t perform that action at this time.
0 commit comments