Skip to content

Commit

Permalink
Merge pull request #573 from slr71/main
Browse files Browse the repository at this point in the history
CORE-1999: fix the matching file count when no matching files are found
  • Loading branch information
slr71 authored Jun 5, 2024
2 parents 5e448b8 + dd3d28c commit 278cabd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/search/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ export const getSearchLink = ({ searchTerm = "", advancedDataQuery = "" }) => {
};

export const extractTotal = (result) => {
return result?.total?.value || result?.total;
return typeof result?.total === "object"
? result?.total?.value
: result?.total;
};

0 comments on commit 278cabd

Please sign in to comment.