File tree Expand file tree Collapse file tree
src/pages/iou/request/step/IOURequestStepScan Expand file tree Collapse file tree Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff 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 ) ] }
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments