@conform-to/zod
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -180,3 +180,3 @@ 'use strict'; | ||
function refine(ctx, options) { | ||
if (!options.when) { | ||
if (typeof options.when !== 'undefined' && !options.when) { | ||
ctx.addIssue({ | ||
@@ -183,0 +183,0 @@ code: z__namespace.ZodIssueCode.custom, |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"main": "index.js", | ||
@@ -29,3 +29,3 @@ "module": "index.mjs", | ||
"peerDependencies": { | ||
"@conform-to/dom": "0.7.2", | ||
"@conform-to/dom": "0.7.3", | ||
"zod": "^3.21.0" | ||
@@ -32,0 +32,0 @@ }, |
@@ -76,3 +76,3 @@ # @conform-to/zod | ||
export let action = async ({ request }) => { | ||
export async function action({ request }) { | ||
const formData = await request.formData(); | ||
@@ -92,3 +92,3 @@ const submission = await parse(formData, { | ||
// ... | ||
}; | ||
} | ||
``` | ||
@@ -95,0 +95,0 @@ |
Sorry, the diff of this file is not supported yet
25563