From 0147719b4fd8c3618ab45c25dd0f31fcbd1746f2 Mon Sep 17 00:00:00 2001 From: imlonghao Date: Sun, 9 Feb 2020 20:08:25 +0800 Subject: [PATCH] fix: hackerone hacktivity replace null severity (#3946) --- lib/routes/hackerone/hacktivity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/hackerone/hacktivity.js b/lib/routes/hackerone/hacktivity.js index 4ec2411856..8145f3cc2e 100644 --- a/lib/routes/hackerone/hacktivity.js +++ b/lib/routes/hackerone/hacktivity.js @@ -32,7 +32,7 @@ module.exports = async (ctx) => { const author = item.node.reporter.username; const vendor = item.node.team.name; const state = item.node.report.substate.replace(/^[a-z]/g, (L) => L.toUpperCase()); - const severity = item.node.severity_rating.replace(/^[a-z]/g, (L) => L.toUpperCase()); + const severity = item.node.severity_rating ? item.node.severity_rating.replace(/^[a-z]/g, (L) => L.toUpperCase()) : 'No Rating'; const awarded = item.node.total_awarded_amount ? item.node.total_awarded_amount : 0; return { title: item.node.report.title,