docs: 🐛 check window location

Signed-off-by: jffarge <jf@dagger.io>
This commit is contained in:
jffarge 2021-06-25 17:01:21 +02:00
parent 36cf20ae2d
commit cb8667ddf1

View File

@ -169,7 +169,7 @@ function DocPage(props) {
amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": window.location.pathname });
}
})
}, [window.location.pathname])
}, [(typeof window !== "undefined" && window.location.pathname)])
if (isLoading) return <Spinner />