Remove cache stupidity

This commit is contained in:
regalijan 2023-10-19 16:49:50 -04:00
parent c1c2f36307
commit 9c0b048bfe
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -1,10 +1,5 @@
import createCache from "@emotion/cache"; import createCache from "@emotion/cache";
export default function createEmotionCache() { export default function createEmotionCache() {
// The browser throws when calling .default, but the server throws if we don't call .default return createCache({ key: "cha" });
// Of course!
return typeof document === "undefined"
? createCache.default({ key: "cha" })
: // @ts-expect-error
createCache({ key: "cha" });
} }