Merge pull request #63 from Keshav2567/patch-1

Fixed endless error
This commit is contained in:
Brad Traversy 2021-07-31 10:29:58 -04:00 committed by GitHub
commit 584c1b99db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,12 +33,14 @@ function randomSelect() {
const interval = setInterval(() => { const interval = setInterval(() => {
const randomTag = pickRandomTag() const randomTag = pickRandomTag()
if (randomTag !== undefined) {
highlightTag(randomTag) highlightTag(randomTag)
setTimeout(() => { setTimeout(() => {
unHighlightTag(randomTag) unHighlightTag(randomTag)
}, 100) }, 100)
}
}, 100); }, 100);
setTimeout(() => { setTimeout(() => {
@ -64,4 +66,4 @@ function highlightTag(tag) {
function unHighlightTag(tag) { function unHighlightTag(tag) {
tag.classList.remove('highlight') tag.classList.remove('highlight')
} }