Skip to content

Commit

Permalink
Leave harmless undefined vid in the set
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Dupuy <[email protected]>
  • Loading branch information
flo-dup committed Feb 23, 2024
1 parent 49f78a9 commit e4c1176
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/single-line-diagram-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,7 @@ export class SingleLineDiagramViewer {
private addNavigationArrow() {
if (this.onNextVoltageCallback !== null) {
let navigable = this.svgMetadata?.nodes.filter((el) => el.nextVId);
const vlList = navigable
?.map((element) => element.vid)
.filter((vid) => vid !== '');
const vlList = navigable?.map((element) => element.vid);
const vlSet = new Set(vlList);

//remove arrows if the arrow points to the current svg
Expand Down

0 comments on commit e4c1176

Please sign in to comment.