Skip to content

Commit 40b7ee6

Browse files
gutris1missionfloyd
authored andcommitted
* small fix, prevent annoying error log when registering keydown esc from user custom js * Update script.js Co-authored-by: missionfloyd <[email protected]> --------- Co-authored-by: missionfloyd <[email protected]>
1 parent 5e2af93 commit 40b7ee6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)