diff --git a/src/components/viewer.ts b/src/components/viewer.ts index e5862b97..823c33d7 100644 --- a/src/components/viewer.ts +++ b/src/components/viewer.ts @@ -274,9 +274,9 @@ export class FrigateCardViewerCarousel extends FrigateCardMediaCarousel { return [ ...super._getPlugins(), Lazyload({ - lazyloadCallback: this.viewerConfig?.lazy_load - ? this._lazyloadSlide.bind(this) - : undefined, + ...(this.viewerConfig?.lazy_load && { + lazyLoadCallback: this._lazyloadSlide.bind(this), + }), }), AutoMediaPlugin({ playerSelector: 'frigate-card-ha-hls-player',