From deb0645192abd4d3d16479837b660c8bf390f816 Mon Sep 17 00:00:00 2001 From: Philipp Schaad Date: Mon, 30 Sep 2024 13:15:25 +0200 Subject: [PATCH] Fix --- src/local_view/elements/map_node.ts | 2 +- src/local_view/elements/memory_node.ts | 2 +- src/local_view/graph/graph.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/local_view/elements/map_node.ts b/src/local_view/elements/map_node.ts index cd64f2b5..60f956dc 100644 --- a/src/local_view/elements/map_node.ts +++ b/src/local_view/elements/map_node.ts @@ -365,7 +365,7 @@ export class MapNode extends Node { access.dataContainer ); if (nodes) { - const node = nodes.values().next().value[1]; + const node = nodes.values()?.next()?.value[1]; if (node && !access.index.includes(undefined)) { const cl = node.getCacheLine(access.index as number[]); diff --git a/src/local_view/elements/memory_node.ts b/src/local_view/elements/memory_node.ts index b4280a13..7f5baef6 100644 --- a/src/local_view/elements/memory_node.ts +++ b/src/local_view/elements/memory_node.ts @@ -159,7 +159,7 @@ class MemoryTile extends Graphics { const nodeRet = this.memoryNode.parentGraph.memoryNodesMap.get(key); if (nodeRet !== undefined && nodeRet.size) { - const node = nodeRet.values().next().value[1]; + const node = nodeRet.values()?.next()?.value[1]; val.forEach(v => { node.applyToIdx( diff --git a/src/local_view/graph/graph.ts b/src/local_view/graph/graph.ts index e2eb92e0..f0eb7636 100644 --- a/src/local_view/graph/graph.ts +++ b/src/local_view/graph/graph.ts @@ -87,7 +87,7 @@ export class Graph extends Graphics { public contractGraph(): void { const contractionRegions = this.findContractionRegions(); for (const region of contractionRegions) { - const regionId = region.values().next().value.id; + const regionId = region.values()?.next()?.value.id; const regionInEdges = new Set(); const regionOutEdges = new Set(); const removedContainers = new Set();