Skip to content

Commit a47d79b

Browse files
committed
refactor: scoped dom query
1 parent 06cd579 commit a47d79b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

013-random choice picker/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const highlightTag = (tag) => tag.classList.add("highlight");
2424
const unHighlightTag = (tag) => tag.classList.remove("highlight");
2525

2626
const randomSelect = () => {
27-
const tags = document.querySelectorAll(".tag");
27+
const tags = tagsElements.querySelectorAll(".tag");
2828
const times = 30;
2929
const interval = setInterval(() => {
3030
const randomTag = pickRandomTag(tags);

0 commit comments

Comments
 (0)