Skip to content

Commit

Permalink
fix: no type leads to empty checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
kptdobe committed May 21, 2024
1 parent 2a2edab commit 5825364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function addEnterLeaveTracking() {
// reload: same page, navigate: same origin, enter: everything else
if (type === 'reload' || source === window.location.href) {
sampleRUM('reload', payload);
} else if (type !== 'navigate') {
} else if (type && type !== 'navigate') {
sampleRUM(type, payload); // back, forward, prerender, etc.
} else if (source && window.location.origin === new URL(source).origin) {
sampleRUM('navigate', payload); // internal navigation
Expand Down

0 comments on commit 5825364

Please sign in to comment.