Skip to content

Commit

Permalink
fix(video-cta): addres ci-check failure
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelojcs committed Jul 8, 2024
1 parent f7174b5 commit b343bf4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/web-components/src/component-mixins/cta/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ const VideoCTAMixin = <T extends Constructor<HTMLElement>>(Base: T) => {
// Declaring this mixin as it extends `LitElement` seems to cause a TS error
// @ts-ignore
super.updated(changedProperties);
customElements.whenDefined(`${ddsPrefix}-video-cta-container`).then((response) => {
const { ctaType, videoName, videoDescription, href, videoDuration } =
this;
const { eventRequestVideoData } = this
.constructor as typeof VideoCTAMixinImpl;
const { ctaType, videoName, videoDescription, href, videoDuration } =
this;
const { eventRequestVideoData } = this.constructor as typeof VideoCTAMixinImpl;

customElements.whenDefined(`${ddsPrefix}-video-cta-container`).then(() => {
if (changedProperties.has('ctaType') && ctaType === CTA_TYPE.VIDEO) {
if (typeof videoDuration === 'undefined') {
this.dispatchEvent(
Expand Down Expand Up @@ -172,11 +172,10 @@ const VideoCTAMixin = <T extends Constructor<HTMLElement>>(Base: T) => {
})
);
}

if (ctaType === CTA_TYPE.VIDEO && this.offsetWidth > 0) {
this._updateVideoThumbnailUrl();
}
});
if (ctaType === CTA_TYPE.VIDEO && this.offsetWidth > 0) {
this._updateVideoThumbnailUrl();
}
}

/**
Expand Down

0 comments on commit b343bf4

Please sign in to comment.