Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
phschaad committed Sep 30, 2024
1 parent deb0645 commit 9260a13
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/local_view/elements/map_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,9 @@ export class MapNode extends Node {
const nodes = this.parentGraph.memoryNodesMap.get(
access.dataContainer
);
if (nodes) {
const node = nodes.values()?.next()?.value[1];
const nxt = nodes?.values().next().value;
if (nxt) {
const node = nxt[1];

if (node && !access.index.includes(undefined)) {
const cl = node.getCacheLine(access.index as number[]);
Expand Down
5 changes: 3 additions & 2 deletions src/local_view/elements/memory_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ class MemoryTile extends Graphics {
region[1].forEach((val, key) => {
const nodeRet =
this.memoryNode.parentGraph.memoryNodesMap.get(key);
if (nodeRet !== undefined && nodeRet.size) {
const node = nodeRet.values()?.next()?.value[1];
const nxt = nodeRet?.values()?.next()?.value;
if (nxt !== undefined) {
const node = nxt[1];

val.forEach(v => {
node.applyToIdx(
Expand Down
2 changes: 1 addition & 1 deletion src/local_view/graph/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Edge>();
const regionOutEdges = new Set<Edge>();
const removedContainers = new Set<DataContainer>();
Expand Down

0 comments on commit 9260a13

Please sign in to comment.