From 54c191805520acf16e11b41f812571cfaf93706f Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 27 Jan 2022 12:45:58 -0800 Subject: [PATCH] Do more filtering in faster browser-native code --- vopamoi.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vopamoi.ts b/vopamoi.ts index d0f4fa1..cbb9af2 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -80,8 +80,8 @@ const Model = { }, hasTag: function (task: Element, tag: string): Element | null { - for (const child of task.children) { - if (child.classList.contains("tag") && child.textContent === tag) { + for (const child of task.getElementsByClassName("tag")) { + if (child.textContent === tag) { return child; } } -- 2.44.1