Skip to content

Commit

Permalink
renamed asset mapping node fetch variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodcog committed Aug 20, 2024
1 parent db65218 commit 8ed7b94
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ export const useSearchMappedEquipmentAssetMappings = (
userSdk?: CogniteClient
): UseInfiniteQueryResult<InfiniteData<AssetPage>, Error> => {
const sdk = useSDK(userSdk);
const { data: assetMappingList, isFetched } = useAssetMappedNodesForRevisions(
models.map((model) => ({ ...model, type: 'cad' }))
);
const { data: assetMappingList, isFetched: isAssetMappingNodesFetched } =
useAssetMappedNodesForRevisions(models.map((model) => ({ ...model, type: 'cad' })));
const { data: initialAssetMappings, isLoading: isInitialAssetMappingsLoading } =
useAllMappedEquipmentAssetMappings(models, sdk);

Expand Down Expand Up @@ -103,7 +102,7 @@ export const useSearchMappedEquipmentAssetMappings = (
},
enabled:
!isInitialAssetMappingsLoading &&
isFetched &&
isAssetMappingNodesFetched &&
assetMappingList !== undefined &&
assetMappingList.length > 0
});
Expand Down

0 comments on commit 8ed7b94

Please sign in to comment.