File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
packages-exp/performance-exp/src Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ import {
45
45
import { name , version } from '../package.json' ;
46
46
import { Trace } from './resources/trace' ;
47
47
import '@firebase/installations-exp' ;
48
- import { getModularInstance } from '@firebase/util' ;
48
+ import { deepEqual , getModularInstance } from '@firebase/util' ;
49
49
50
50
const DEFAULT_ENTRY_NAME = '[DEFAULT]' ;
51
51
@@ -81,12 +81,7 @@ export function initializePerformance(
81
81
if ( provider . isInitialized ( ) ) {
82
82
const existingInstance = provider . getImmediate ( ) ;
83
83
const initialSettings = provider . getOptions ( ) as PerformanceSettings ;
84
- if (
85
- settings ?. dataCollectionEnabled ===
86
- initialSettings ?. dataCollectionEnabled &&
87
- settings ?. instrumentationEnabled ===
88
- initialSettings ?. instrumentationEnabled
89
- ) {
84
+ if ( deepEqual ( initialSettings , settings ?? { } ) ) {
90
85
return existingInstance ;
91
86
} else {
92
87
throw ERROR_FACTORY . create ( ErrorCode . ALREADY_INITIALIZED ) ;
You can’t perform that action at this time.
0 commit comments