Skip to content

Commit

Permalink
adjust frontend error handling
Browse files Browse the repository at this point in the history
adjust frontend error handling
  • Loading branch information
DJensen94 committed Oct 3, 2024
1 parent 36a6cc5 commit 3707c93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/pages/Vulnerabilities/Vulnerabilities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ export const Vulnerabilities: React.FC<{ groupBy?: string }> = ({
domainId: vuln?.domain?.id,
product: vuln.cpe
? vuln.cpe
: (vuln.service && vuln.service.products && vuln.service.products.length > 0)
? (vuln.service.products[0].cpe || 'N/A')
: (vuln.service && vuln.service.products && vuln.service.products.length > 0 && vuln.service.products[0].cpe)

Check failure on line 287 in frontend/src/pages/Vulnerabilities/Vulnerabilities.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `(vuln.service·&&·vuln.service.products·&&·vuln.service.products.length·>·0·&&·vuln.service.products[0].cpe)` with `vuln.service·&&⏎········vuln.service.products·&&⏎········vuln.service.products.length·>·0·&&⏎········vuln.service.products[0].cpe`
? (vuln.service.products[0].cpe)

Check failure on line 288 in frontend/src/pages/Vulnerabilities/Vulnerabilities.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `(vuln.service.products[0].cpe)` with `vuln.service.products[0].cpe`
: 'N/A',
createdAt: vuln?.createdAt
? `${differenceInCalendarDays(
Expand Down

0 comments on commit 3707c93

Please sign in to comment.