Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/browser/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ function startSessionTracking(): void {

// We want to create a session for every navigation as well
addInstrumentationHandler({
callback: () => {
callback: ({ from, to }) => {
// Don't create an additional session for the initial route or if the location did not change
if (from === undefined || from === to) {
return;
}
hub.startSession();
hub.captureSession();
},
Expand Down