Fix toggleActiveHeader to handle empty banner case (#15930)

This commit is contained in:
Andrii Holovin 2024-11-13 23:40:33 +02:00 committed by GitHub
parent 93c28e51ed
commit 2f1a6a3f17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ function handleEvents(): void {
function toggleActiveHeader(): void {
const top = window.scrollY;
if (!banner) {
if (!banner || !banner.length) {
return;
}