Skip to content

Commit

Permalink
Merge pull request #166 from adobe/fix-undefined
Browse files Browse the repository at this point in the history
fix: in case window.hlx exists but window.hlx.rum is undefined
  • Loading branch information
chicharr authored May 14, 2024
2 parents c96d7b6 + 581653b commit 04325e7
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 @@ -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,
Expand Down

0 comments on commit 04325e7

Please sign in to comment.