File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,15 @@ define([
4949 videoElement . setAttribute ( 'data-video-src' , videoElement . getAttribute ( 'data-cookieblock-src' ) ) ;
5050 videoElement . style . display = 'block' ;
5151 videoElement . removeAttribute ( 'data-cookieblock-src' ) ;
52- videoElement . closest ( '.custom-slide-uwt' ) . querySelector ( '.cookieconsent-optout-marketing' ) . remove ( ) ;
52+
53+ // Safely remove the consent blocker element with null checks
54+ const customSlide = videoElement . closest ( '.custom-slide-uwt' ) ;
55+ if ( customSlide ) {
56+ const consentBlocker = customSlide . querySelector ( '.cookieconsent-optout-marketing' ) ;
57+ if ( consentBlocker ) {
58+ consentBlocker . remove ( ) ;
59+ }
60+ }
5361 }
5462 videoElement . setAttribute ( 'data-element-in-viewport' , '.jarallax-viewport-element' ) ;
5563 videoElement . appendChild ( viewportElement ) ;
You can’t perform that action at this time.
0 commit comments