Browse Source

Make `getHierarchy` synchronous

master
buttercat1791 1 year ago
parent
commit
9011eb643f
  1. 2
      src/lib/data_structures/publication_tree.ts

2
src/lib/data_structures/publication_tree.ts

@ -136,7 +136,7 @@ export class PublicationTree implements AsyncIterable<NDKEvent> { @@ -136,7 +136,7 @@ export class PublicationTree implements AsyncIterable<NDKEvent> {
* @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<NDKEvent[]> {
getHierarchy(address: string): NDKEvent[] {
let node = this.#nodes.get(address);
if (!node) {
throw new Error(`PublicationTree: Node with address ${address} not found.`);

Loading…
Cancel
Save