Skip to content

Commit

Permalink
fix(lib): update scripts/aem.js to aem.js@2.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
semantic-release-bot committed Nov 1, 2024
1 parent 5e7bd30 commit 941e264
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/aem.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,14 @@ function sampleRUM(checkpoint, data) {
sampleRUM.enhance = () => {
// only enhance once
if (document.querySelector('script[src*="rum-enhancer"]')) return;

const { enhancerVersion, enhancerHash } = sampleRUM.enhancerContext || {};
const script = document.createElement('script');
if (enhancerHash) {
script.integrity = enhancerHash;
script.setAttribute('crossorigin', 'anonymous');
}
script.src = new URL(
'.rum/@adobe/helix-rum-enhancer@^2/src/index.js',
`.rum/@adobe/helix-rum-enhancer@${enhancerVersion || '^2'}/src/index.js`,
sampleRUM.baseURL,
).href;
document.head.appendChild(script);
Expand Down

0 comments on commit 941e264

Please sign in to comment.