Skip to content

Commit 3b491b7

Browse files
committed
Add missing properties for vulnerability comparison
Signed-off-by: Xavier Maso <[email protected]>
1 parent c24f8b4 commit 3b491b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/models/vulnerability/vulnerability.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ export class Vulnerability implements Comparable<Vulnerability> {
112112
/* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */
113113
return (this.id ?? '').localeCompare(other.id ?? '') ||
114114
(this.description ?? '').localeCompare(other.description ?? '') ||
115-
(this.detail ?? '').localeCompare(other.detail ?? '')
115+
(this.detail ?? '').localeCompare(other.detail ?? '') ||
116+
(this.recommendation ?? '').localeCompare(other.recommendation ?? '') ||
117+
(this.created.toString() ?? '').localeCompare(other.created.toString() ?? '') ||
118+
(this.published.toString() ?? '').localeCompare(other.published.toString() ?? '') ||
119+
(this.updated.toString() ?? '').localeCompare(other.updated.toString() ?? '')
116120
/* eslint-enable @typescript-eslint/strict-boolean-expressions */
117121
}
118122
}

0 commit comments

Comments
 (0)