Skip to content

Commit

Permalink
Fix navigation bar on secure contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
KingRainbow44 committed Aug 12, 2023
1 parent 044fa6b commit 1afe1ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ui/components/landing/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ class Navigation extends React.Component<{}, IState> {
}

componentDidMount() {
if ((window as any).navigation) {
if ((window as any).navBar) {
return;
}

(window as any).navigation = this;
(window as any).navBar = this;
window.addEventListener("scroll", this.handleScroll.bind(this));
}

componentWillUnmount() {
if (!(window as any).navigation) {
if (!(window as any).navBar) {
return;
}

(window as any).navigation = undefined;
(window as any).navBar = undefined;
window.removeEventListener("scroll", this.handleScroll.bind(this));
}

Expand Down

0 comments on commit 1afe1ec

Please sign in to comment.