Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move expect-error directive to correct spot
regalijan committed Oct 19, 2023
1 parent aafdc9b commit b1acf13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/createEmotionCache.ts
@@ -3,10 +3,10 @@ import createCache from "@emotion/cache";
export const defaultCache = createEmotionCache();

export default function createEmotionCache() {
// @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" });
: // @ts-expect-error
createCache({ key: "cha" });
}

0 comments on commit b1acf13

Please sign in to comment.