fix JS error if no image set in tree stalling projectmanager element-list and search

This commit is contained in:
ralf 2024-08-07 10:15:29 +02:00
parent a6edaf6df6
commit 67dedb7705

View File

@ -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;
}