Skip to content

Commit 9b260cd

Browse files
committed
fix(networks): try catch
1 parent 9f0614d commit 9b260cd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

client/src/api/networks/network/ignore.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,15 @@ export function mergeNodesFromLabel(graph: Graph, model: string) {
101101
const dupes = nodes.slice(1)
102102
// console.log("master", master, "dupes", dupes)
103103

104-
dupes.forEach((dupe) => {
104+
dupes.forEach((dupe: string) => {
105105
// merge nodes attributes
106106
const dupeAttr = graph.getNodeAttributes(dupe)
107107

108108
// get weight of master/dupe link if it exist
109109
let masterLinkWeight = 0
110110
try {
111111
masterLinkWeight = graph.getUndirectedEdgeAttribute(master, dupe, "weight")
112-
} finally {
113-
}
112+
} catch (_) {}
114113

115114
graph.updateNode(master, (attr) => ({
116115
label: attr.label,
@@ -137,6 +136,5 @@ export function mergeNodesFromLabel(graph: Graph, model: string) {
137136
graph.dropNode(dupe)
138137
})
139138
})
140-
141139
return graph
142140
}

0 commit comments

Comments
 (0)