mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Fixed the "Uncaught TypeError: Cannot read property 'className' of null" bug that appears when creating folders
This commit is contained in:
@@ -27,7 +27,10 @@ document.addEventListener('click', function (e) {
|
||||
const className = e.target.className
|
||||
if (!className && typeof (className) !== 'string') return
|
||||
const isInfoButton = className.includes('infoButton')
|
||||
const isInfoPanel = e.target.offsetParent.className.includes('infoPanel')
|
||||
let isInfoPanel = false
|
||||
if (e.target.offsetParent !== null) {
|
||||
isInfoPanel = e.target.offsetParent.className.includes('infoPanel')
|
||||
}
|
||||
if (isInfoButton || isInfoPanel) return
|
||||
const infoPanel = document.querySelector('.infoPanel')
|
||||
if (infoPanel) infoPanel.style.display = 'none'
|
||||
|
||||
Reference in New Issue
Block a user