Skip to content

Commit 69f17d4

Browse files
authored
Merge pull request Expensify#63521 from ishakakkad/61824_2
2 parents 31fc9da + 89d1acf commit 69f17d4

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/pages/iou/request/step/IOURequestStepScan/index.native.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,9 @@ function IOURequestStepScan({
752752
<View
753753
style={styles.flex1}
754754
onLayout={() => {
755+
if (!onLayout) {
756+
return;
757+
}
755758
onLayout(setTestReceiptAndNavigate);
756759
}}
757760
>

src/pages/iou/request/step/IOURequestStepScan/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,9 @@ function IOURequestStepScan({
10411041
{isLoadingReceipt && <FullScreenLoadingIndicator />}
10421042
<View
10431043
onLayout={() => {
1044+
if (!onLayout) {
1045+
return;
1046+
}
10441047
onLayout(setTestReceiptAndNavigate);
10451048
}}
10461049
style={[styles.flex1, !isMobile() && styles.uploadFileView(isSmallScreenWidth)]}

src/pages/iou/request/step/IOURequestStepScan/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ type IOURequestStepScanProps = WithCurrentUserPersonalDetailsProps &
1414
* Callback function that is triggered on the `onLayout` event.
1515
* Receives a function (`setTestReceiptAndNavigate`) as an argument,
1616
*/
17-
onLayout: (setTestReceiptAndNavigate: () => void) => void;
17+
onLayout?: (setTestReceiptAndNavigate: () => void) => void;
18+
1819
/** Disable tab swipe */
1920
setTabSwipeDisabled?: (isDisabled: boolean) => void;
2021

0 commit comments

Comments
 (0)