From 5825364bd9fa5367bc20c3788ac4f162e2e11f4a Mon Sep 17 00:00:00 2001 From: Alexandre Capt Date: Tue, 21 May 2024 10:56:35 +0200 Subject: [PATCH] fix: no type leads to empty checkpoint --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 6e1095a..19d07c0 100644 --- a/src/index.js +++ b/src/index.js @@ -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