From 9011eb643f8373d409f8e3af7a40ec89d9f41a29 Mon Sep 17 00:00:00 2001 From: buttercat1791 Date: Fri, 14 Mar 2025 08:11:05 -0500 Subject: [PATCH] Make `getHierarchy` synchronous --- src/lib/data_structures/publication_tree.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/data_structures/publication_tree.ts b/src/lib/data_structures/publication_tree.ts index 1cdbe16..ab011a2 100644 --- a/src/lib/data_structures/publication_tree.ts +++ b/src/lib/data_structures/publication_tree.ts @@ -136,7 +136,7 @@ export class PublicationTree implements AsyncIterable { * @returns Returns an array of events in the addressed event's hierarchy, beginning with the * root and ending with the addressed event. */ - async getHierarchy(address: string): Promise { + getHierarchy(address: string): NDKEvent[] { let node = this.#nodes.get(address); if (!node) { throw new Error(`PublicationTree: Node with address ${address} not found.`);