Skip to content

Commit

Permalink
fix: update boolean type
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictb committed Aug 5, 2024
1 parent 8772f8f commit 41ce85d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/workspace/withPolicyConnections.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isBoolean} from 'lodash';
import isBoolean from 'lodash/isBoolean';
import React, {useEffect, useState} from 'react';
import type {ComponentType} from 'react';
import {useOnyx} from 'react-native-onyx';
Expand Down Expand Up @@ -32,7 +32,7 @@ function withPolicyConnections<TProps extends WithPolicyConnectionsProps>(Wrappe
initWithStoredValues: false,
});
const isConnectionDataFetchNeeded =
!isOffline && props.policy && (!!props.policy.areConnectionsEnabled || !isEmptyObject(props.policy.connections)) && !hasConnectionsDataBeenFetched;
!isOffline && !!props.policy && (!!props.policy.areConnectionsEnabled || !isEmptyObject(props.policy.connections)) && !hasConnectionsDataBeenFetched;

const [isFetchingData, setIsFetchingData] = useState(false);

Expand All @@ -55,7 +55,7 @@ function withPolicyConnections<TProps extends WithPolicyConnectionsProps>(Wrappe
openPolicyAccountingPage(props.policy.id);
}, [props.policy?.id, isConnectionDataFetchNeeded]);

if ((!!isConnectionDataFetchNeeded || isFetchingData) && shouldBlockView) {
if ((isConnectionDataFetchNeeded || isFetchingData) && shouldBlockView) {
return <FullScreenLoadingIndicator />;
}

Expand Down

0 comments on commit 41ce85d

Please sign in to comment.