Skip to content

Commit

Permalink
fix: If only 1 vulnerability is available display it openly
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Junk committed Nov 28, 2023
1 parent 7f1385d commit 8e68afb
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@
}
let header = vulnerability.cve ? vulnerability.cve : `Vulnerability ${index}`;
let open = false;
$: if ($appStore.ui.selectedCVE === vulnerability.cve) {
$: if ($appStore.doc?.vulnerabilities && $appStore.doc?.vulnerabilities.length === 1) {
open = true;
}
$: if ($appStore.ui.selectedCVE && $appStore.ui.selectedCVE === vulnerability.cve) {
open = true;
updateUI();
} else {
} else if ($appStore.ui.selectedCVE && $appStore.ui.selectedCVE !== vulnerability.cve) {
open = false;
}
</script>
Expand Down

0 comments on commit 8e68afb

Please sign in to comment.