fix: hackerone hacktivity fix username empty (#4955)

This commit is contained in:
imlonghao 2020-06-10 11:45:58 +08:00 committed by GitHub
parent 47922c6c2c
commit e56a71a7a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ module.exports = async (ctx) => {
title: 'HackerOne Hacker Activity',
link: 'https://hackerone.com/hacktivity',
item: response.data.data.hacktivity_items.edges.map((item) => {
const author = item.node.reporter.username;
const author = item.node.reporter ? item.node.reporter.username : 'Someone';
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 ? item.node.severity_rating.replace(/^[a-z]/g, (L) => L.toUpperCase()) : 'No Rating';