Skip to content

Commit 548af08

Browse files
committed
Avoid overriding YamlObject in case of race condition
1 parent 6715fd2 commit 548af08

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/app/component/activity-description/activity-description.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export class ActivityDescriptionComponent implements OnInit {
7878
YamlObject: any;
7979
GeneralLabels: string[] = [];
8080
KnowledgeLabels: string[] = [];
81+
TeamList: string[] = [];
8182
rowIndex: number = 0;
8283
markdown: md = md();
8384
SAMMVersion: string = 'OWASP SAMM VERSION 2';
@@ -98,6 +99,9 @@ export class ActivityDescriptionComponent implements OnInit {
9899
console.log(this.perfNow() + 's: meta.yaml fetch');
99100
this.yaml.getJson().subscribe(data => {
100101
console.log(this.perfNow() + 's: meta.yaml');
102+
this.GeneralLabels = data['strings']['en']['labels'];
103+
this.KnowledgeLabels = data['strings']['en']['KnowledgeLabels'];
104+
this.TeamList = data['teams']; // Genuine teams (the true source)
101105
console.log(this.perfNow() + 's: meta.yaml processed');
102106
});
103107
//gets value from generated folder

0 commit comments

Comments
 (0)