From 71278c804176076e1cbe4d1e9c5151b2dee9cd83 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 19 May 2023 09:20:47 +0200 Subject: [PATCH] fix TypeError: item.querySelector is not a function --- api/js/etemplate/Et2Select/Et2Select.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Select/Et2Select.ts b/api/js/etemplate/Et2Select/Et2Select.ts index 8c18af335c..511b345051 100644 --- a/api/js/etemplate/Et2Select/Et2Select.ts +++ b/api/js/etemplate/Et2Select/Et2Select.ts @@ -869,7 +869,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect) protected _createImage(item) { - let image = item.querySelector("et2-image") || item.querySelector("[slot='prefix']"); + let image = item ? item.querySelector("et2-image") || item.querySelector("[slot='prefix']") : null; if(image) { image = image.clone();