From af74a20de7802058ba14c7732f912e711531e725 Mon Sep 17 00:00:00 2001 From: Jamil Date: Tue, 3 Jan 2023 12:21:11 -0800 Subject: [PATCH] Fix docs page crash (#1265) https://discourse.firez.one/t/issue-with-firezone-documentation/380 --- docs/src/components/InstallBlock/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/src/components/InstallBlock/index.js b/docs/src/components/InstallBlock/index.js index ec91c8e7d..24c9a9673 100644 --- a/docs/src/components/InstallBlock/index.js +++ b/docs/src/components/InstallBlock/index.js @@ -6,11 +6,10 @@ export default function InstallBlock() { return ( Loading...}> {() => { - if (window.posthog && typeof window.posthog.get_distinct_id === "function") { - const distinct_id = window.posthog.get_distinct_id() - } else { - const distinct_id = "posthog-blocked" - } + const distinct_id = + (window.posthog && typeof window.posthog.get_distinct_id === "function") + ? window.posthog.get_distinct_id() + : "posthog-blocked" return (