From 7725e744c623359d6ea05cd66fdfcdecbf3b2715 Mon Sep 17 00:00:00 2001 From: Oscar Lorentzon Date: Fri, 13 Oct 2023 11:33:38 -0700 Subject: [PATCH] feat: do not require cluster id to exist for node --- src/graph/Graph.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graph/Graph.ts b/src/graph/Graph.ts index 7da73d96..9427daf1 100644 --- a/src/graph/Graph.ts +++ b/src/graph/Graph.ts @@ -1910,7 +1910,8 @@ export class Graph { private _addClusterNode(node: Image): void { const clusterId = node.clusterId; if (clusterId == null) { - throw new GraphMapillaryError(`Image does not have cluster (${node.id}).`); + console.warn(`Cannot set cluster node, cluster ID is undefined for node ${node.id}.`); + return; } if (!this._clusterNodes.has(clusterId)) {