fix(scrollbar): handle null viewport in haveScrollbar()

This commit is contained in:
Hakadao
2025-02-11 17:56:25 +08:00
parent c278c98658
commit d7a242416b

View File

@@ -271,6 +271,9 @@ async function haveScrollbar() {
const { scrollHeight } = viewport // get scroll offset
return scrollHeight > window.innerHeight
}
else {
return false
}
}
// In drawer video, watch btn className changed and post message to parent