From a0093fb0c97c7e31ddb7846788d7fed6450dba70 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sun, 23 Oct 2022 23:08:46 -0700 Subject: [PATCH] Fix server rendered title tag. Closes #2251 --- web/components/TitleNotifier/TitleNotifier.tsx | 2 +- web/components/layouts/Main.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/web/components/TitleNotifier/TitleNotifier.tsx b/web/components/TitleNotifier/TitleNotifier.tsx index 592e96d45..6e90d2e72 100644 --- a/web/components/TitleNotifier/TitleNotifier.tsx +++ b/web/components/TitleNotifier/TitleNotifier.tsx @@ -18,7 +18,7 @@ export const TitleNotifier: FC = () => { const onBlur = () => { backgrounded = true; - defaultTitle = document.title; + defaultTitle = window.document.title; }; const onFocus = () => { diff --git a/web/components/layouts/Main.tsx b/web/components/layouts/Main.tsx index 2718b4c83..b646767c9 100644 --- a/web/components/layouts/Main.tsx +++ b/web/components/layouts/Main.tsx @@ -67,9 +67,7 @@ export const Main: FC = () => { - {!isProduction && {name}} - {isProduction && {'{{.Name}}'}} - + {name ? {name} : {`{{.Name}}`}}