Fix: empty icons for modules will no longer be rendered (#880)

Signed-off-by: davfsa <davfsa@gmail.com>
Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
davfsa
2025-04-02 06:05:22 +02:00
committed by GitHub
parent 56dca9c176
commit c9ce27afb9

View File

@@ -23,9 +23,9 @@ export const Module = ({
const getIconWidget = (useTxtIcn: boolean): JSX.Element | undefined => { const getIconWidget = (useTxtIcn: boolean): JSX.Element | undefined => {
let iconWidget: JSX.Element | undefined; let iconWidget: JSX.Element | undefined;
if (icon !== undefined && !useTxtIcn) { if (icon !== undefined && icon.get() != '' && !useTxtIcn) {
iconWidget = <icon className={`txt-icon bar-button-icon module-icon ${boxClass}`} icon={icon} />; iconWidget = <icon className={`txt-icon bar-button-icon module-icon ${boxClass}`} icon={icon} />;
} else if (textIcon !== undefined) { } else if (textIcon !== undefined && textIcon.get() != '') {
iconWidget = <label className={`txt-icon bar-button-icon module-icon ${boxClass}`} label={textIcon} />; iconWidget = <label className={`txt-icon bar-button-icon module-icon ${boxClass}`} label={textIcon} />;
} }