Skip to content

Commit f71b1c0

Browse files
committed
Add test
1 parent a0b16e2 commit f71b1c0

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

packages/react/src/stores/theme-store.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ function createClientThemeStore() {
3939
}
4040
}
4141

42-
export function createServerThemeStore(): ReturnType<
43-
typeof createClientThemeStore
44-
> {
45-
return {
46-
get: () => null,
47-
set: () => {},
48-
subscribe: () => () => {},
49-
} as unknown as ReturnType<typeof createClientThemeStore>
42+
const serverThemeStore: ReturnType<typeof createClientThemeStore> = {
43+
get: () => null,
44+
set: () => {},
45+
subscribe: () => () => {},
46+
} as unknown as ReturnType<typeof createClientThemeStore>
47+
48+
export function createServerThemeStore() {
49+
return serverThemeStore
5050
}
5151

5252
export const createThemeStore: typeof createClientThemeStore =
5353
typeof window === 'undefined'
54-
? (createServerThemeStore as unknown as typeof createClientThemeStore)
54+
? createServerThemeStore
5555
: createClientThemeStore

0 commit comments

Comments
 (0)