File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ export function initializeServerApp(
235235/**
236236 * Creates and initializes a {@link @firebase/app#FirebaseServerApp } instance.
237237 *
238- * @param config - Optional `FirebaseServerApp` configuration .
238+ * @param config - Optional `FirebaseServerApp` settings .
239239 *
240240 * @returns The initialized `FirebaseServerApp`.
241241 *
@@ -253,21 +253,23 @@ export function initializeServerApp(
253253 throw ERROR_FACTORY . create ( AppError . INVALID_SERVER_APP_ENVIRONMENT ) ;
254254 }
255255
256- let app : FirebaseApp ;
257256 let firebaseOptions : FirebaseOptions | undefined ;
258257 let serverAppSettings : FirebaseServerAppSettings = _serverAppConfig || { } ;
259258
260259 if ( _options ) {
261260 if ( _isFirebaseApp ( _options ) ) {
262- app = _options ;
263- firebaseOptions = app . options ;
261+ firebaseOptions = _options . options ;
264262 } else if ( _isFirebaseServerAppSettings ( _options ) ) {
265263 serverAppSettings = _options ;
266264 } else {
267265 firebaseOptions = _options ;
268266 }
269267 }
270268
269+ if ( serverAppSettings . automaticDataCollectionEnabled === undefined ) {
270+ serverAppSettings . automaticDataCollectionEnabled = true ;
271+ }
272+
271273 firebaseOptions ||= getDefaultAppConfig ( ) ;
272274 if ( ! firebaseOptions ) {
273275 throw ERROR_FACTORY . create ( AppError . NO_OPTIONS ) ;
You can’t perform that action at this time.
0 commit comments