diff --git a/src/index.js b/src/index.js index d784808..b260d8e 100644 --- a/src/index.js +++ b/src/index.js @@ -53,7 +53,7 @@ const navigate = (source, type) => { // 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