diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index 7d10b5d0bee8..2dacd5f957fe 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -120,20 +120,21 @@ const MenuItem = React.forwardRef((props, ref) => { return; } const parser = new ExpensiMark(); - setHtml(parser.replace(convertToLTR(props.title))); + setHtml(parser.replace(props.title)); titleRef.current = props.title; }, [props.title, props.shouldParseTitle]); const getProcessedTitle = useMemo(() => { + let title = ''; if (props.shouldRenderAsHTML) { - return convertToLTR(props.title); + title = convertToLTR(props.title); } if (props.shouldParseTitle) { - return html; + title = html; } - return ''; + return title ? `${title}` : ''; }, [props.title, props.shouldRenderAsHTML, props.shouldParseTitle, html]); const hasPressableRightComponent = props.onIconRightPress || props.iconRight || (props.rightComponent && props.shouldShowRightComponent);