File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ export function _INTERNAL_captureLog(
120
120
...beforeLog . attributes ,
121
121
} ;
122
122
123
- const { user } = getScopeData ( currentScope ) ;
123
+ const { user } = getMergedScopeData ( currentScope ) ;
124
124
// Only attach user to log attributes if sendDefaultPii is enabled
125
125
if ( client . getOptions ( ) . sendDefaultPii ) {
126
126
const { id, email, username } = user ;
@@ -238,16 +238,15 @@ export function _INTERNAL_getLogBuffer(client: Client): Array<SerializedLog> | u
238
238
}
239
239
240
240
/**
241
- * Get the scope data for the current scope.
241
+ * Get the scope data for the current scope after merging with the
242
+ * global scope and isolation scope.
243
+ *
242
244
* @param currentScope - The current scope.
243
245
* @returns The scope data.
244
246
*/
245
- function getScopeData ( currentScope : Scope ) : ScopeData {
247
+ function getMergedScopeData ( currentScope : Scope ) : ScopeData {
246
248
const scopeData = getGlobalScope ( ) . getScopeData ( ) ;
247
- const isolationScope = getIsolationScope ( ) ;
248
- if ( isolationScope ) {
249
- mergeScopeData ( scopeData , isolationScope . getScopeData ( ) ) ;
250
- }
249
+ mergeScopeData ( scopeData , getIsolationScope ( ) . getScopeData ( ) ) ;
251
250
mergeScopeData ( scopeData , currentScope . getScopeData ( ) ) ;
252
251
return scopeData ;
253
252
}
You can’t perform that action at this time.
0 commit comments