From cb8667ddf12abce3e2f9bb978aefbc2cc6223004 Mon Sep 17 00:00:00 2001 From: jffarge Date: Fri, 25 Jun 2021 17:01:21 +0200 Subject: [PATCH] docs: :bug: check window location Signed-off-by: jffarge --- website/src/theme/DocPage/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/theme/DocPage/index.js b/website/src/theme/DocPage/index.js index ddfd5807..3eebf60d 100644 --- a/website/src/theme/DocPage/index.js +++ b/website/src/theme/DocPage/index.js @@ -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