UI: Fix ATT&CK report bug which wasn't showing IP addresses in PBAs

Fixes #1370
PR #1393
This commit is contained in:
Shreya Malviya 2021-08-02 20:05:03 +05:30 committed by GitHub
parent 8ae0d5720b
commit fdba9f54ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@ export function renderMachineFromSystemData(data) {
machineStr = data['hostname'] + ' ( ';
}
data['ips'].forEach(function (ipInfo) {
if (typeof ipInfo === 'object') {
if (ipInfo instanceof Array) {
machineStr += ipInfo.join(', ') + ', ';
} else if (typeof ipInfo === 'object') {
machineStr += ipInfo['addr'] + ', ';
} else {
machineStr += ipInfo + ', ';