Deduplicate of available Characteristics
All checks were successful
E2E Testing / test (push) Successful in 1m33s

This commit is contained in:
Sebastian Böckelmann 2024-05-11 11:08:19 +02:00
parent 1469f2e509
commit b70aee9004

View File

@ -29,7 +29,11 @@ export class InventorySlotCharacteristicEditorComponent implements OnInit{
ngOnInit() { ngOnInit() {
this.itemgroups.forEach(itemgroup => { this.itemgroups.forEach(itemgroup => {
this.availableCharacteristics = this.availableCharacteristics.concat(itemgroup.itemGroupCharacteristics); itemgroup.itemGroupCharacteristics.forEach(characteristic => {
if(!this.availableCharacteristics.includes(characteristic)) {
this.availableCharacteristics.push(characteristic)
}
})
}) })
this.datasource.data = this.inventorySlot!.slotCharacteristics; this.datasource.data = this.inventorySlot!.slotCharacteristics;
} }