We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc39c6a commit 1aa6521Copy full SHA for 1aa6521
1 file changed
src/utils/useCookie.ts
@@ -37,7 +37,7 @@ export function useCookie<K extends keyof typeof schemas>(name: K) {
37
const parsed = schemas[name].safeParse(
38
typeof value === "string" ? value : JSON.parse(value),
39
);
40
- return parsed.success ? parsed.data : null;
+ return parsed.success ? (parsed.data as Value) : null;
41
}, [name]);
42
43
// Set cookie with validation
0 commit comments