From c30f48337ebbd24e78cdc2633756057bb3824cfc Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Wed, 21 Feb 2024 23:33:08 +0530 Subject: [PATCH] Fix amount selection logic --- src/pages/iou/steps/MoneyRequestAmountForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/steps/MoneyRequestAmountForm.tsx b/src/pages/iou/steps/MoneyRequestAmountForm.tsx index 5bec1052c790..cb1f73ae2207 100644 --- a/src/pages/iou/steps/MoneyRequestAmountForm.tsx +++ b/src/pages/iou/steps/MoneyRequestAmountForm.tsx @@ -104,7 +104,7 @@ function MoneyRequestAmountForm( */ const onMouseDown = (event: React.MouseEvent, ids: string[]) => { const relatedTargetId = (event.nativeEvent?.target as HTMLElement)?.id; - if (ids.includes(relatedTargetId)) { + if (!ids.includes(relatedTargetId)) { return; } @@ -127,7 +127,7 @@ function MoneyRequestAmountForm( }, []); useEffect(() => { - if (!currency || typeof amount === 'number') { + if (!currency || typeof amount !== 'number') { return; } initializeAmount(amount);