Skip to content

Commit

Permalink
include _sdkProcessingMetadata when cloning scope
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Nov 17, 2022
1 parent 62ad0f3 commit 0e3ed7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/scope.ts
Expand Up @@ -95,6 +95,8 @@ export class Scope implements ScopeInterface {
/** Request Mode Session Status */
protected _requestSession?: RequestSession;

// NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.

public constructor() {
this._notifyingListeners = false;
this._scopeListeners = [];
Expand Down Expand Up @@ -128,6 +130,7 @@ export class Scope implements ScopeInterface {
newScope._eventProcessors = [...scope._eventProcessors];
newScope._requestSession = scope._requestSession;
newScope._attachments = [...scope._attachments];
newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata };
}
return newScope;
}
Expand Down

0 comments on commit 0e3ed7f

Please sign in to comment.