Avoid egwIsMobile() is undefined in tests

This commit is contained in:
nathan 2024-11-15 10:53:55 -07:00
parent 1a70183e0b
commit 80cb0b1f9f

View File

@ -1261,11 +1261,12 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
{ {
const classes = option.class ? Object.fromEntries((option.class).split(" ").map(k => [k, true])) : {}; const classes = option.class ? Object.fromEntries((option.class).split(" ").map(k => [k, true])) : {};
const value = (<string>option.value).replaceAll(" ", "___"); const value = (<string>option.value).replaceAll(" ", "___");
const isMobile = typeof egwIsMobile == "function" ? egwIsMobile() : false
return html` return html`
<sl-option <sl-option
part="option" part="option"
exportparts="prefix:tag__prefix, suffix:tag__suffix, image" exportparts="prefix:tag__prefix, suffix:tag__suffix, image"
title="${!egwIsMobile() && option.title ? (this.noLang ? option.title : this.egw().lang(option.title)) : nothing}" title="${!isMobile && option.title ? (this.noLang ? option.title : this.egw().lang(option.title)) : nothing}"
class=${classMap({ class=${classMap({
...classes ...classes
})} })}