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(
235
235
/**
236
236
* Creates and initializes a {@link @firebase/app#FirebaseServerApp } instance.
237
237
*
238
- * @param config - Optional `FirebaseServerApp` configuration .
238
+ * @param config - Optional `FirebaseServerApp` settings .
239
239
*
240
240
* @returns The initialized `FirebaseServerApp`.
241
241
*
@@ -253,21 +253,23 @@ export function initializeServerApp(
253
253
throw ERROR_FACTORY . create ( AppError . INVALID_SERVER_APP_ENVIRONMENT ) ;
254
254
}
255
255
256
- let app : FirebaseApp ;
257
256
let firebaseOptions : FirebaseOptions | undefined ;
258
257
let serverAppSettings : FirebaseServerAppSettings = _serverAppConfig || { } ;
259
258
260
259
if ( _options ) {
261
260
if ( _isFirebaseApp ( _options ) ) {
262
- app = _options ;
263
- firebaseOptions = app . options ;
261
+ firebaseOptions = _options . options ;
264
262
} else if ( _isFirebaseServerAppSettings ( _options ) ) {
265
263
serverAppSettings = _options ;
266
264
} else {
267
265
firebaseOptions = _options ;
268
266
}
269
267
}
270
268
269
+ if ( serverAppSettings . automaticDataCollectionEnabled === undefined ) {
270
+ serverAppSettings . automaticDataCollectionEnabled = true ;
271
+ }
272
+
271
273
firebaseOptions ||= getDefaultAppConfig ( ) ;
272
274
if ( ! firebaseOptions ) {
273
275
throw ERROR_FACTORY . create ( AppError . NO_OPTIONS ) ;
You can’t perform that action at this time.
0 commit comments