diff --git a/src/index.js b/src/index.js index 890b783..0bc9000 100644 --- a/src/index.js +++ b/src/index.js @@ -12,7 +12,7 @@ /* eslint-env browser */ const KNOWN_PROPERTIES = ['weight', 'id', 'referer', 'checkpoint', 't', 'source', 'target', 'cwv', 'CLS', 'FID', 'LCP', 'INP', 'TTFB']; const DEFAULT_TRACKING_EVENTS = ['click', 'cwv', 'form', 'enterleave', 'viewblock', 'viewmedia', 'loadresource', 'utm']; -const { sampleRUM, queue, isSelected } = window.hlx ? window.hlx.rum : {}; +const { sampleRUM, queue, isSelected } = window.hlx && window.hlx.rum ? window.hlx.rum : {}; const urlSanitizers = { full: () => window.location.href,