Skip to content

Commit

Permalink
chore(ui): dont do the cost query if no calls found (#3469)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtarpenning authored Jan 22, 2025
1 parent 7caea1b commit 84cb396
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const useCallsForQuery = (
);

const costCols = useMemo(() => ['id'], []);
const noCalls = calls.result == null || calls.result.length === 0;
const costs = useCalls(
entity,
project,
Expand All @@ -108,7 +109,7 @@ export const useCallsForQuery = (
costCols,
expandedColumns,
{
skip: calls.loading,
skip: calls.loading || noCalls,
includeCosts: true,
}
);
Expand Down

0 comments on commit 84cb396

Please sign in to comment.