Skip to content

Commit e7edad6

Browse files
Small fix (#16872)
* small fix, prevent annoying error log when registering keydown esc from user custom js * Update script.js Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com> --------- Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>
1 parent d8688de commit e7edad6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ document.addEventListener('keydown', function(e) {
182182
const lightboxModal = document.querySelector('#lightboxModal');
183183
if (!globalPopup || globalPopup.style.display === 'none') {
184184
if (document.activeElement === lightboxModal) return;
185-
if (interruptButton.style.display === 'block') {
185+
if (interruptButton?.style.display === 'block') {
186186
interruptButton.click();
187187
e.preventDefault();
188188
}

0 commit comments

Comments
 (0)