Skip to content

Commit

Permalink
deduplicate custom container selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode committed May 23, 2024
1 parent fa7cfe9 commit d011c18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/artalk/src/plugins/stat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async function loadStatCount(args: {
/** Retrieve elements based on selectors */
function retrieveElements(containers: string[]): Set<HTMLElement> {
const els = new Set<HTMLElement>()
containers.forEach((selector) => {
new Set(containers).forEach((selector) => {
document.querySelectorAll<HTMLElement>(selector).forEach((el) => els.add(el))
})
return els
Expand Down

0 comments on commit d011c18

Please sign in to comment.