From 57e1845c16ccf8b3a3abf66a5210832f63d9ec71 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 27 May 2022 14:20:35 -0600 Subject: [PATCH] Avoid errors if src changes before first render & img is not there --- api/js/etemplate/Et2Image/Et2Image.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Image/Et2Image.ts b/api/js/etemplate/Et2Image/Et2Image.ts index d4857f404d..53d9a7dbbb 100644 --- a/api/js/etemplate/Et2Image/Et2Image.ts +++ b/api/js/etemplate/Et2Image/Et2Image.ts @@ -172,7 +172,7 @@ export class Et2Image extends Et2Widget(SlotMixin(LitElement)) implements et2_ID { super.updated(changedProperties); - if(changedProperties.has("src")) + if(changedProperties.has("src") && this._img) { this._img.setAttribute("src", this.parse_href(this.src) || this.parse_href(this.default_src)); }