Reject if !this.hass
This commit is contained in:
@@ -55,8 +55,12 @@ export class FrigateCardThumbnailFeatureEvent extends LitElement {
|
|||||||
return this.thumbnail;
|
return this.thumbnail;
|
||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
//eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
if (!this.hass) {
|
||||||
this.hass!.fetchWithAuth(thumbnail)
|
reject();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.hass
|
||||||
|
.fetchWithAuth(thumbnail)
|
||||||
// Since we are fetching with an authorization header, we cannot just put the
|
// Since we are fetching with an authorization header, we cannot just put the
|
||||||
// URL directly into the document; we need to embed the image. We could do this
|
// URL directly into the document; we need to embed the image. We could do this
|
||||||
// using blob URLs, but then we would need to keep track of them in order to
|
// using blob URLs, but then we would need to keep track of them in order to
|
||||||
|
|||||||
Reference in New Issue
Block a user