We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0122860 commit 841e2ceCopy full SHA for 841e2ce
packages/standard-validator/src/index.ts
@@ -156,7 +156,7 @@ const sValidator = <
156
return hookResult
157
}
158
159
- if ('response' in hookResult) {
+ if (typeof hookResult === 'object' && 'response' in hookResult) {
160
return hookResult.response
161
162
@@ -168,7 +168,7 @@ const sValidator = <
168
return c.json({ data: value, error: processedIssues, success: false }, 400)
169
170
171
- return result.value as StandardSchemaV1.InferOutput<Schema>
+ return (result as { value: StandardSchemaV1.InferOutput<Schema> }).value
172
})
173
174
export type { Hook }
0 commit comments