Skip to content

Commit

Permalink
Fix bug when page is reloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
EMaksy committed May 12, 2023
1 parent 5aaaae2 commit 4ad95d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions assets/js/components/ExecutionResults/checksUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ export const isPremium = (catalog, checkID) => {
return false;
};

export const getCatalogCategoryList = (catalog, checksResults = []) =>
[
export const getCatalogCategoryList = (catalog, checksResults = []) => {
if (catalog.length === 0) {
return [];
}
return [
...new Set(
checksResults.map(
({ check_id }) => catalog.find((check) => check.id === check_id).group
)
),
].sort();
};

export const getCheckDescription = (catalog, checkID) => {
const check = findCheck(catalog, checkID);
Expand Down

0 comments on commit 4ad95d7

Please sign in to comment.