fix: TypeError: Cannot read properties of undefined (reading 'filter') - when trying to delete a org/team with runners

close #210
This commit is contained in:
Philipp Dormann 2025-03-28 21:14:14 +01:00
parent 78dcad0857
commit c4201e9a68
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314

View File

@ -57,7 +57,10 @@ export class Runner extends Participant {
* This is implemented here to avoid duplicate code in other files.
*/
public get validScans(): Scan[] {
return this.scans.filter(scan => scan.valid == true);
if (this.scans) {
return this.scans.filter(scan => scan.valid == true);
}
return []
}
/**