Skip to content

Commit

Permalink
Used find instad of filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankit-Keshari-Vituity committed Nov 1, 2022
1 parent 9a3ac25 commit c145bca
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ export default function SchemaTable({
function getCount(fieldPath: any) {
const data: any =
usageStats?.aggregations?.fields &&
usageStats?.aggregations?.fields.filter((field) => {
usageStats?.aggregations?.fields.find((field) => {
return field?.fieldName === fieldPath;
});
return data && data[0]?.count;
return data && data.count;
}

const usageColumn = {
Expand Down

0 comments on commit c145bca

Please sign in to comment.