Skip to content

Commit f52ebb4

Browse files
committed
fix(image): normalize null replicate option to undefined in editImage
1 parent 379a4de commit f52ebb4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/api/editImage.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,11 @@ export async function editImage(opts: EditImageOptions): Promise<EditImageResult
212212
// default NSFW filter vetoes them otherwise. Caller's existing
213213
// explicit setting wins (allows opt-out for test surfaces).
214214
const existingReplicate =
215-
(effectiveProviderOptions as Record<string, unknown> | undefined)?.replicate as
215+
((effectiveProviderOptions as Record<string, unknown> | undefined)?.replicate as
216216
| Record<string, unknown>
217-
| undefined;
217+
| null
218+
| undefined)
219+
?? undefined;
218220
if (
219221
existingReplicate === undefined
220222
|| typeof existingReplicate.disableSafetyChecker === 'undefined'

0 commit comments

Comments
 (0)