Fixed endless error

Handled the error if user input is undefined or just an empty string (which causes an endless error)
This commit is contained in:
Keshav2567 2021-07-05 18:08:26 +05:30 committed by GitHub
parent 0cb9fd377d
commit 4191c02d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(() => {