mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
fix(scrollbar): handle null viewport in haveScrollbar()
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user