Merge pull request #726 from slumbering/fix-window-location

check window location
This commit is contained in:
Andrea Luzzardi 2021-06-25 17:08:01 +02:00 committed by GitHub
commit a5a995bb49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,7 @@ function DocPage(props) {
amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": window.location.pathname }); 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 /> if (isLoading) return <Spinner />