remove empty ('') detection location entries

master
Marcus Bakker 2020-10-15 19:56:29 +02:00
parent bd73180b36
commit 23a0d1035f
1 changed files with 7 additions and 1 deletions

View File

@ -205,7 +205,13 @@ export default {
yaml_input.techniques[i].detection[x].applicable_to = ['all'];
}
if (yaml_input.techniques[i].detection[x].location == undefined) {
yaml_input.techniques[i].detection[x].location = [''];
yaml_input.techniques[i].detection[x].location = [];
}
let length_location = yaml_input.techniques[i].detection[x].location.length;
while (length_location--) {
if (yaml_input.techniques[i].detection[x].location[length_location] == '') {
yaml_input.techniques[i].detection[x].location.splice(length_location, 1);
}
}
if (yaml_input.techniques[i].detection[x].comment == undefined) {
yaml_input.techniques[i].detection[x].comment = '';