Skip to content

Commit

Permalink
#131 - Check if window is an object before enabling sticky navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Erbe committed Jun 25, 2022
1 parent 68e983a commit d1c8ad1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.12.2
+ **Bug** [131](https://github.com/VizuaaLOG/BulmaJS/issues/131) Navbar will now detect if window is defined before trying to attach sticky events

# 0.12.1
+ **Bug** [120](https://github.com/VizuaaLOG/BulmaJS/issues/120) Panel tabs will now properly take into account `is-active`. On `init` this will become the starting tab

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class Navbar extends Plugin {
* Should this navbar stick to the top of the page?
* @type {boolean}
*/
this.sticky = !!this.config.get('sticky');
this.sticky = typeof window === 'object' && !!this.config.get('sticky');

/**
* The offset in pixels before the navbar will stick to the top of the page
Expand Down

0 comments on commit d1c8ad1

Please sign in to comment.