Skip to content

Commit

Permalink
Merge pull request #40893 from Expensify/hayata-fix-infinite-loading-…
Browse files Browse the repository at this point in the history
…screen-when-fetching-connections-data

[CP Staging] Don't show the loading screen when the connections feature is not enabled
  • Loading branch information
mountiny authored Apr 24, 2024
2 parents 9cceec8 + 279a72b commit cd3966e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/workspace/withPolicyConnections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function withPolicyConnections<TProps extends WithPolicyConnectionsProps>(Wrappe
openPolicyAccountingPage(props.policy.id);
}, [hasConnectionsDataBeenFetched, props.policy, isOffline]);

if (!props.policy || status === 'loading' || !hasConnectionsDataBeenFetched) {
if (props.policy?.areConnectionsEnabled && (!props.policy || status === 'loading' || hasConnectionsDataBeenFetched === false)) {
return (
<FullPageOfflineBlockingView>
<FullScreenLoadingIndicator />
Expand Down

0 comments on commit cd3966e

Please sign in to comment.