Skip to content

Commit

Permalink
fix window access in navbar code
Browse files Browse the repository at this point in the history
  • Loading branch information
toBeOfUse committed May 3, 2024
1 parent fa4601c commit bc579a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/navigation/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
computed: {
padding() {
let scaleFactor = 1;
if (window && window.innerHeight && window.innerHeight < 700) {
if (typeof window !== "undefined" && window.innerHeight && window.innerHeight < 700) {
scaleFactor = 0.5;
}
let n = (30 * scaleFactor) * (1 - this.progress) + (10 * scaleFactor) * this.progress
Expand Down

0 comments on commit bc579a1

Please sign in to comment.