Skip to content

Commit d8870fe

Browse files
Revert "🐛 Strip test query params from URL before Next.js hydration"
This reverts commit 64c302b.
1 parent bbf26e8 commit d8870fe

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

test/apps/nextjs/instrumentation-client.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ if (config && !datadogRum.getInitConfiguration()) {
1010
if (context) {
1111
datadogRum.setGlobalContext(JSON.parse(context))
1212
}
13-
14-
// Strip test-only query params from the URL so Next.js's segment cache
15-
// doesn't store them as the canonical URL for this route.
16-
const url = new URL(window.location.href)
17-
url.searchParams.delete('rum-config')
18-
url.searchParams.delete('rum-context')
19-
window.history.replaceState(window.history.state, '', url.toString())
2013
}
2114

2215
export { onRouterTransitionStart } from '@datadog/browser-rum-nextjs'

0 commit comments

Comments
 (0)