From 431d26783dfd815cb929319b983141cdbbf80abb Mon Sep 17 00:00:00 2001 From: Max Richter Date: Wed, 1 May 2024 23:26:34 +0200 Subject: [PATCH] fix: make sure to not double load nodes --- app/src/lib/node-registry-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/lib/node-registry-client.ts b/app/src/lib/node-registry-client.ts index 4c6afda..2d49c93 100644 --- a/app/src/lib/node-registry-client.ts +++ b/app/src/lib/node-registry-client.ts @@ -49,7 +49,7 @@ export class RemoteNodeRegistry implements NodeRegistry { async load(nodeIds: `${string}/${string}/${string}`[]) { const a = performance.now(); - const nodes = await Promise.all(nodeIds.map(async id => { + const nodes = await Promise.all([...new Set(nodeIds).values()].map(async id => { if (this.nodes.has(id)) { return this.nodes.get(id)!;