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:
@@ -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} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user