From 67dedb77054a7e94382828cd4c6f0eeae4094a6a Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 7 Aug 2024 10:15:29 +0200 Subject: [PATCH] fix JS error if no image set in tree stalling projectmanager element-list and search --- api/js/etemplate/Et2Tree/Et2Tree.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Tree/Et2Tree.ts b/api/js/etemplate/Et2Tree/Et2Tree.ts index f7489061e8..27c92d9f37 100644 --- a/api/js/etemplate/Et2Tree/Et2Tree.ts +++ b/api/js/etemplate/Et2Tree/Et2Tree.ts @@ -872,7 +872,7 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) implements Fin img = img.replace(".png", ".svg"); } //append image path, if img is only relative (does not start with / or https://) - if (!img.match(/^(\/|https?:\/\/)/)) + if (img && typeof img === "string" && !img.match(/^(\/|https?:\/\/)/)) { img = this.imagePath + img; }