Skip to content

Commit

Permalink
updating util function return type
Browse files Browse the repository at this point in the history
  • Loading branch information
opauloh committed Jun 16, 2023
1 parent 389980f commit a022658
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export const getQuery = ({
});
const getFirstKey = (
buckets: AggregationsMultiBucketAggregateBase<AggregationsStringTermsBucketKeys>['buckets']
): undefined | string => {
if (!!Array.isArray(buckets) && !!buckets.length) return buckets[0].key;
) => {
return !!Array.isArray(buckets) && !!buckets.length ? (buckets[0].key as string) : '';
};
const createVulnerabilitiesByResource = (resource: FindingsAggBucket) => ({
resource: {
Expand Down

This file was deleted.

0 comments on commit a022658

Please sign in to comment.