Skip to content

Commit 46396fc

Browse files
committed
fix empty view is shown briefly after clear cache
1 parent ccf5583 commit 46396fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/iou/request/step/IOURequestStepDestination.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ function IOURequestStepDestination({
7373
const shouldShowNotFoundPage = isEmptyObject(policy);
7474

7575
const {isOffline} = useNetwork();
76-
const isLoading = !isOffline && isLoadingOnyxValue(policyMetadata);
77-
const shouldShowEmptyState = isEmptyObject(customUnit?.rates) && !isOffline;
76+
const isLoading = !isOffline && (!customUnit?.rates || isLoadingOnyxValue(policyMetadata));
77+
const shouldShowEmptyState = isEmptyObject(customUnit?.rates) && !isOffline && !isLoading;
7878
const shouldShowOfflineView = isEmptyObject(customUnit?.rates) && isOffline;
7979

8080
const navigateBack = () => {

0 commit comments

Comments
 (0)