Skip to content

Commit

Permalink
Check technique message type before converting to markdown for ATT&CK…
Browse files Browse the repository at this point in the history
… report
  • Loading branch information
shreyamalviya committed Jan 29, 2021
1 parent c537106 commit 67d8a3b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ class AttackReport extends React.Component {
}
// modify techniques' messages
for (const tech_id in techniques){
techniques[tech_id]['message'] = <div dangerouslySetInnerHTML={{__html: marked(techniques[tech_id]['message'])}} />;
if (typeof techniques[tech_id]['message'] === 'string') {
techniques[tech_id]['message'] = <div dangerouslySetInnerHTML={{__html: marked(techniques[tech_id]['message'])}} />;
}
}

return techniques
Expand Down

0 comments on commit 67d8a3b

Please sign in to comment.