Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Commit 2592c94

Browse files
authored
Merge pull request #717 from asmsuechan/fix-a-bug-on-click
Fix a bug on click
2 parents d94a674 + 7b3a3ba commit 2592c94

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

browser/main/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ document.addEventListener('dragover', function (e) {
2424
})
2525

2626
document.addEventListener('click', function (e) {
27-
if (!e.target.className) return
28-
const isInfoButton = e.target.className.includes('infoButton')
27+
const className = e.target.className
28+
if (!className && typeof (className) !== 'string') return
29+
const isInfoButton = className.includes('infoButton')
2930
const isInfoPanel = e.target.offsetParent.className.includes('infoPanel')
3031
if (isInfoButton || isInfoPanel) return
3132
const infoPanel = document.querySelector('.infoPanel')

0 commit comments

Comments
 (0)