Skip to content

Commit 8305b71

Browse files
committed
remove claim that we're fixing a race condition by copying location object
1 parent ee6f6ac commit 8305b71

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

packages/tracing/src/hubextensions.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ function getDefaultSampleContext<T extends Transaction>(transaction: T): SampleC
153153
const globalObject = getGlobalObject<WindowOrWorkerGlobalScope>();
154154

155155
if ('location' in globalObject) {
156-
// we take a copy of the location object rather than just a reference to it in case there's a navigation or
157-
// redirect in the instant between when the transaction starts and when the sampler is called
158156
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
159157
defaultSampleContext.location = { ...(globalObject as any).location };
160158
}

0 commit comments

Comments
 (0)