diff --git a/apps/web/src/main.ts b/apps/web/src/main.ts index 7ab57dd..4448f95 100644 --- a/apps/web/src/main.ts +++ b/apps/web/src/main.ts @@ -336,9 +336,7 @@ function recentColorTray({ tray.classList.add("recent-color-tray") const updateSelectedClass = (element?: HTMLElement) => { - ;[...tray.getElementsByClassName("recent-color")].forEach((e) => { - e.classList.remove("selected") - }) + tray.querySelector(".recent-color.selected")?.classList.remove("selected"); element?.classList.add("selected") } return {