Skip to content

Commit e2ae5d9

Browse files
committed
Fix: JS error reading classList of undefined
1 parent 825bbe8 commit e2ae5d9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

assets/react/front/course/_spotlight-quiz.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,10 @@ window.jQuery(document).ready($=>{
272272
setTimeout(() => { quizSubmitBtn.disabled = true; }, 500);
273273
} else {
274274
e.preventDefault();
275-
quizSubmitBtn.classList.remove('is-loading')
276-
quizSubmitBtn.disabled = false;
275+
if (quizSubmitBtn) {
276+
quizSubmitBtn.classList.remove('is-loading')
277+
quizSubmitBtn.disabled = false;
278+
}
277279
}
278280
});
279281

0 commit comments

Comments
 (0)