From 9be6a47d8871a1df88b1b2c7d281b880e26e5724 Mon Sep 17 00:00:00 2001 From: smonesi <63957397+smonesi@users.noreply.github.com> Date: Thu, 22 Dec 2022 12:52:15 +0100 Subject: [PATCH] Attempt to fix picture-elements functionality broken in 2022.11 (#14813) fixes undefined --- src/panels/lovelace/components/hui-image.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/components/hui-image.ts b/src/panels/lovelace/components/hui-image.ts index 555bca93ad..573210f86d 100644 --- a/src/panels/lovelace/components/hui-image.ts +++ b/src/panels/lovelace/components/hui-image.ts @@ -193,7 +193,7 @@ export class HuiImage extends LitElement { style=${styleMap({ paddingBottom: useRatio ? `${((100 * this._ratio!.h) / this._ratio!.w).toFixed(2)}%` - : !this._lastImageHeight + : this._lastImageHeight === undefined ? "56.25%" : undefined, backgroundImage: @@ -206,7 +206,7 @@ export class HuiImage extends LitElement { : undefined, })} class="container ${classMap({ - ratio: useRatio || !this._lastImageHeight, + ratio: useRatio || this._lastImageHeight === undefined, })}" > ${this.cameraImage && this.cameraView === "live"