Skip to content

Commit 8f379c2

Browse files
authored
Merge pull request #42 from customgento/DEV-1536-fix-js-error
Fix js error, DEV-1536
2 parents 50c206d + 55d0220 commit 8f379c2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

view/frontend/web/js/fotorama-video-events-mixin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ define([
2222
addEventListener('CookiebotOnAccept', () => {
2323
if (Cookiebot?.consent?.marketing) {
2424
const cookiebotOutput = document?.querySelector('.cookieconsent-optout-marketing');
25+
26+
if (!cookiebotOutput) {
27+
return;
28+
}
29+
2530
const videoElement = cookiebotOutput.closest('.video-unplayed[aria-hidden="false"]');
2631

2732
const event = new PointerEvent('click', {

0 commit comments

Comments
 (0)