From 5b0ab2d4c52de25e835d6d98d127d10974203ed0 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 12 Jun 2024 15:49:52 -0600 Subject: [PATCH] Avoid error if egw.image is not a function happens on doc site --- api/js/etemplate/Styles/shoelace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Styles/shoelace.ts b/api/js/etemplate/Styles/shoelace.ts index f072c15138..ddd466dffb 100644 --- a/api/js/etemplate/Styles/shoelace.ts +++ b/api/js/etemplate/Styles/shoelace.ts @@ -15,7 +15,7 @@ import {egw} from "../../jsapi/egw_global"; registerIconLibrary('default', { resolver: name => { - return typeof egw !== "undefined" ? (egw.image(name) ?? `${egw.webserverUrl || ""}/node_modules/@shoelace-style/shoelace/dist/assets/icons/${name}.svg`) : '' + return typeof egw !== "undefined" && typeof egw.image == "function" ? (egw.image(name) ?? `${egw.webserverUrl || ""}/node_modules/@shoelace-style/shoelace/dist/assets/icons/${name}.svg`) : '' }, });