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

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 />