diff --git a/app/createEmotionCache.ts b/app/createEmotionCache.ts index 6005330..816493b 100644 --- a/app/createEmotionCache.ts +++ b/app/createEmotionCache.ts @@ -3,5 +3,10 @@ import createCache from "@emotion/cache"; export const defaultCache = createEmotionCache(); export default function createEmotionCache() { - return createCache.default({ key: "cha" }); + // @ts-expect-error + // The browser throws when calling .default, but the server throws if we don't call .default + // Of course! + return typeof document === "undefined" + ? createCache.default({ key: "cha" }) + : createCache({ key: "cha" }); } diff --git a/app/root.tsx b/app/root.tsx index 39b03fa..4e7edc8 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -158,8 +158,8 @@ function getMarkup( ) : null} - {helmet.meta?.toString()} - {helmet.title?.toString() ??