Skip to content

Commit f24f540

Browse files
committed
fix handler map
1 parent 19171da commit f24f540

File tree

1 file changed

+4
-3
lines changed
  • src/Frontend/src/resources/SequenceDiagram

1 file changed

+4
-3
lines changed

src/Frontend/src/resources/SequenceDiagram/Handler.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ export function createProcessingHandler(message: Message, processingEndpoint: En
4141
}
4242

4343
export class HandlerRegistry {
44-
#store = new Map<[string, string], HandlerItem>();
44+
#store = new Map<string, HandlerItem>();
45+
private storeKey = (id: string, endpointName: string) => `${id}###${endpointName}`;
4546

4647
register(handler: Handler) {
47-
const existing = this.#store.get([handler.id, handler.endpoint.name]);
48+
const existing = this.#store.get(this.storeKey(handler.id, handler.endpoint.name));
4849
if (existing) return { handler: existing, isNew: false };
4950

50-
this.#store.set([handler.id, handler.endpoint.name], handler as HandlerItem);
51+
this.#store.set(this.storeKey(handler.id, handler.endpoint.name), handler as HandlerItem);
5152
return { handler, isNew: true };
5253
}
5354
}

0 commit comments

Comments
 (0)