Skip to content

Commit f64b8ba

Browse files
committed
Wrap polyfill in window check
1 parent 7e95d7c commit f64b8ba

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

site/src/components/navigation/navigation-container.jsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { useState } from 'preact/hooks'
2-
import 'invokers-polyfill'
2+
3+
if (typeof window !== 'undefined') {
4+
import('invokers-polyfill')
5+
}
36

47
function NavigationContainer(props) {
58
const [isMenuOpen, setIsMenuOpen] = useState(false)

site/src/components/navigation/navigation.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const routesToNotPrefetch = ['/research/component-matrix']
5858
}
5959
</style>
6060

61-
<NavigationContainer client:only>
61+
<NavigationContainer client:load>
6262
<CommunityLinks className="mobile" />
6363

6464
<div class="wrapper">

0 commit comments

Comments
 (0)