mirror of
https://github.com/sst/opencode.git
synced 2025-07-08 00:25:00 +00:00
fix: make set nullable provider options to optional
This commit is contained in:
parent
ea6bfef21a
commit
c72ae70a4a
1 changed files with 1 additions and 1 deletions
|
@ -521,7 +521,7 @@ export namespace Provider {
|
||||||
for (const [key, value] of Object.entries(shape)) {
|
for (const [key, value] of Object.entries(shape)) {
|
||||||
const zodValue = value as z.ZodTypeAny
|
const zodValue = value as z.ZodTypeAny
|
||||||
if (zodValue instanceof z.ZodOptional) {
|
if (zodValue instanceof z.ZodOptional) {
|
||||||
newShape[key] = zodValue.unwrap().nullable()
|
newShape[key] = zodValue.unwrap().nullable().optional()
|
||||||
} else {
|
} else {
|
||||||
newShape[key] = optionalToNullable(zodValue)
|
newShape[key] = optionalToNullable(zodValue)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue