Skip to content

Commit

Permalink
Fix toggleActiveHeader to handle empty banner case (istio#15930)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andygol authored Nov 13, 2024
1 parent 93c28e5 commit 2f1a6a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ts/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function handleEvents(): void {
function toggleActiveHeader(): void {
const top = window.scrollY;

if (!banner) {
if (!banner || !banner.length) {
return;
}

Expand Down

0 comments on commit 2f1a6a3

Please sign in to comment.