Skip to content

Commit

Permalink
fix: fixed secondary sort
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthjain-zemoso authored and santhosh-challa committed Feb 27, 2023
1 parent e03e24b commit e5b8106
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class ComplianceDashboardComponent implements OnInit {
const ASeverity = a["Severity"].valueText??"default";
const BSeverity = b["Severity"].valueText??"default";
if(severeness[ASeverity] == severeness[BSeverity]){
return a['Violations']<b['Violations'] ? -1: 1
return a['Violations'].valueText<b['Violations'].valueText ? 1: -1
}
return (severeness[ASeverity] < severeness[BSeverity] ? -1 : 1) * (isAsc ? 1 : -1);
},
Expand Down

0 comments on commit e5b8106

Please sign in to comment.