diff --git a/deno.json b/deno.json index 462ad84..a89155a 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@dbushell/hyperless", - "version": "0.15.0", + "version": "0.16.0", "exports": { ".": "./mod.ts" }, diff --git a/package.json b/package.json index 90e2f38..7946f2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dbushell/hyperless", - "version": "0.15.0", + "version": "0.16.0", "repository": { "type": "git", "url": "git+https://github.com/dbushell/hyperless.git" diff --git a/src/html-node.ts b/src/html-node.ts index 537b0a2..19f212a 100644 --- a/src/html-node.ts +++ b/src/html-node.ts @@ -203,11 +203,9 @@ export class Node { } /** Traverse node tree */ - async traverse(callback: (node: Node) => unknown): Promise { + traverse(callback: (node: Node) => unknown): void { for (const child of this.#children) { - if ((await Promise.resolve(callback(child))) !== false) { - await child.traverse(callback); - } + if (callback(child) !== false) child.traverse(callback); } }