Fix minor type errors.
This commit is contained in:
@@ -70,7 +70,7 @@ interface HuiConditionalElement extends HTMLElement {
|
|||||||
@customElement('frigate-card-elements-core')
|
@customElement('frigate-card-elements-core')
|
||||||
export class FrigateCardElementsCore extends LitElement {
|
export class FrigateCardElementsCore extends LitElement {
|
||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
public elements: PictureElements;
|
public elements?: PictureElements;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Need to ensure card re-renders when conditions change, hence having it as a
|
* Need to ensure card re-renders when conditions change, hence having it as a
|
||||||
@@ -275,10 +275,10 @@ export class FrigateCardElementsConditional extends LitElement {
|
|||||||
* Render the card.
|
* Render the card.
|
||||||
*/
|
*/
|
||||||
protected render(): TemplateResult | void {
|
protected render(): TemplateResult | void {
|
||||||
if (evaluateConditionViaEvent(this, this._config.conditions)) {
|
if (evaluateConditionViaEvent(this, this._config?.conditions)) {
|
||||||
return html` <frigate-card-elements-core
|
return html` <frigate-card-elements-core
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.elements=${this._config.elements}
|
.elements=${this._config?.elements}
|
||||||
>
|
>
|
||||||
</frigate-card-elements-core>`;
|
</frigate-card-elements-core>`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import {
|
|||||||
dispatchMediaPauseEvent,
|
dispatchMediaPauseEvent,
|
||||||
dispatchMediaPlayEvent,
|
dispatchMediaPlayEvent,
|
||||||
} from '../utils/media-info.js';
|
} from '../utils/media-info.js';
|
||||||
import { updateElementStyleFromMediaLayoutConfig } from '../utils/media-layout.js';
|
|
||||||
import { View } from '../view/view.js';
|
import { View } from '../view/view.js';
|
||||||
import { dispatchErrorMessageEvent } from './message.js';
|
import { dispatchErrorMessageEvent } from './message.js';
|
||||||
|
|
||||||
@@ -153,7 +152,6 @@ export class FrigateCardImage extends LitElement implements FrigateCardMediaPlay
|
|||||||
() => dispatchMediaPauseEvent(this),
|
() => dispatchMediaPauseEvent(this),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
updateElementStyleFromMediaLayoutConfig(this, this.imageConfig?.layout);
|
|
||||||
|
|
||||||
if (changedProps.has('imageConfig') && this.imageConfig?.zoomable) {
|
if (changedProps.has('imageConfig') && this.imageConfig?.zoomable) {
|
||||||
import('./zoomer.js');
|
import('./zoomer.js');
|
||||||
|
|||||||
Reference in New Issue
Block a user