Skip to content

Commit

Permalink
Merge pull request bradtraversy#63 from Keshav2567/patch-1
Browse files Browse the repository at this point in the history
Fixed endless error
  • Loading branch information
bradtraversy committed Jul 31, 2021
2 parents dea2ef5 + 4191c02 commit 584c1b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions random-choice-picker/script.js
Expand Up @@ -33,12 +33,14 @@ function randomSelect() {

const interval = setInterval(() => {
const randomTag = pickRandomTag()


if (randomTag !== undefined) {
highlightTag(randomTag)

setTimeout(() => {
unHighlightTag(randomTag)
}, 100)
}
}, 100);

setTimeout(() => {
Expand All @@ -64,4 +66,4 @@ function highlightTag(tag) {

function unHighlightTag(tag) {
tag.classList.remove('highlight')
}
}

0 comments on commit 584c1b9

Please sign in to comment.