Skip to content

Commit 8785fd7

Browse files
committed
Fix category lookup in ScanResults component to use correct property
1 parent e1ae6ce commit 8785fd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/ScanResults.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const ScanResults = ({ scanResults, onRefreshRequest }) => {
186186
) : null}
187187
{catNum ? (
188188
<span className="cve-category text-gray-600">
189-
Category: {Object.keys(patternCategories).find(k => patternCategories[k] === catNum)} ({catNum})
189+
Category: {Object.keys(patternCategories).find(k => patternCategories[k]?.id === catNum)} ({catNum})
190190
</span>
191191
) : null}
192192
</div>
@@ -260,7 +260,7 @@ const ScanResults = ({ scanResults, onRefreshRequest }) => {
260260
</pre>
261261
{catNum || subCat ? (
262262
<p className="text-xs text-gray-600 mt-2">
263-
Category: {Object.keys(patternCategories).find(k => patternCategories[k] === catNum)} ({catNum})<br />
263+
Category: {Object.keys(patternCategories).find(k => patternCategories[k]?.id === catNum)} ({catNum})<br />
264264
Subcategory: {subCat}
265265
</p>
266266
) : null}

0 commit comments

Comments
 (0)