Skip to content

Commit

Permalink
#26 updating addeventlistener
Browse files Browse the repository at this point in the history
  • Loading branch information
samgildea committed Apr 2, 2021
1 parent 2847689 commit f2b51ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/header/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Header = () => {
setColorchange(false);
}
};
window.addEventListener('scroll', changeNavbarColor);
typeof window !== "undefined" && window.addEventListener('scroll', changeNavbarColor);


return (
Expand Down

0 comments on commit f2b51ec

Please sign in to comment.