From 6d41c9c30ba04c75de57084ae8cc297b8eda03b5 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 21 Nov 2022 09:16:38 -0700 Subject: [PATCH] Et2SelectAccount: Avoid error if option does not have an image --- api/js/etemplate/Et2Select/Et2SelectAccount.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Select/Et2SelectAccount.ts b/api/js/etemplate/Et2Select/Et2SelectAccount.ts index b6180f450b..a4c77e7598 100644 --- a/api/js/etemplate/Et2Select/Et2SelectAccount.ts +++ b/api/js/etemplate/Et2Select/Et2SelectAccount.ts @@ -115,7 +115,10 @@ export class Et2SelectAccount extends Et2Select protected _createImage(item) : Et2Image { const image = super._createImage(item); - image.src = "/egroupware/api/avatar.php?account_id=" + item.value + "&etag=1"; + if(image) + { + image.src = "/egroupware/api/avatar.php?account_id=" + item.value + "&etag=1"; + } return image; } }