From 919859e0208af256bc3a529685ca4d7d9228a179 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Thu, 5 Oct 2023 20:58:09 +0200 Subject: [PATCH 1/2] Fix some bugs with comment tag in memu items --- src/components/MenuItem.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index 7d10b5d0bee8..4d90564bf91c 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -125,15 +125,16 @@ const MenuItem = React.forwardRef((props, ref) => { }, [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); From a650f1dafe85f0f254688dba25ed85c6d99cf802 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Wed, 11 Oct 2023 14:40:17 +0200 Subject: [PATCH 2/2] Fix bug on android --- src/components/MenuItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index 4d90564bf91c..2dacd5f957fe 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -120,7 +120,7 @@ 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]);