Fixed endless error

Handled the error if user input is undefined or just an empty string (which causes an endless error)
pull/63/head
Keshav2567 3 years ago committed by GitHub
parent 0cb9fd377d
commit 4191c02d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,11 +34,13 @@ 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(() => {

Loading…
Cancel
Save