We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70408c3 commit 62dc94dCopy full SHA for 62dc94d
src/components/Search.tsx
@@ -12,7 +12,7 @@ const Search = () => {
12
const searchRef = useRef(null)
13
14
useEffect(() => {
15
- window.docsearch({
+ window?.docsearch?.({
16
appId: "Z2CKVVT2QA",
17
apiKey: "c56a3f265ffbf85c2c654f865cb09164",
18
indexName: "react-hook-form",
src/types/global.d.ts
@@ -1,5 +1,5 @@
1
interface Window {
2
- docsearch: any
+ docsearch?: any
3
}
4
5
declare module "*.mdx" {
0 commit comments