Skip to content

Commit

Permalink
fix sonar
Browse files Browse the repository at this point in the history
Signed-off-by: Tristan Chuine <[email protected]>
  • Loading branch information
Tristan-WorkGH committed Dec 6, 2024
1 parent f09af79 commit 50e5063
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/network-map-viewer/network/map-equipments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class MapEquipments {
const remainingLines = branchesList.filter(
(l) => l.voltageLevelId1 !== voltageLevelId && l.voltageLevelId2 !== voltageLevelId
);
branchesList.filter((l) => !remainingLines.includes(l)).map((l) => this.linesById.delete(l.id));
branchesList.filter((l) => !remainingLines.includes(l)).forEach((l) => this.linesById.delete(l.id));

return remainingLines;
}
Expand Down Expand Up @@ -214,7 +214,7 @@ export class MapEquipments {
this.substations = this.substations.filter((l) => l.id !== equipmentId);

const substation = this.substationsById.get(equipmentId);
substation?.voltageLevels.map((vl) => this.removeEquipment(EQUIPMENT_TYPES.VOLTAGE_LEVEL, vl.id));
substation?.voltageLevels.forEach((vl) => this.removeEquipment(EQUIPMENT_TYPES.VOLTAGE_LEVEL, vl.id));
//@ts-expect-error TODO: manage nullable substation
this.completeSubstationsInfos([substation]);
break;
Expand Down

0 comments on commit 50e5063

Please sign in to comment.