Skip to content

Commit c208b0f

Browse files
committed
query nav container instead of nav to determine if nav needs to be fitted
1 parent 5e994bb commit c208b0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/01-nav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
window.removeEventListener('scroll', fitNav)
167167
nav.style.height = ''
168168
}
169-
if (window.getComputedStyle(nav).position === 'fixed') {
169+
if (window.getComputedStyle(navContainer).position !== 'fixed') {
170170
navBounds.availableHeight = window.innerHeight
171171
navBounds.preferredHeight = nav.getBoundingClientRect().height
172172
fitNav()

0 commit comments

Comments
 (0)