mirror of
https://github.com/samsonjs/Peekaboo.git
synced 2026-04-27 15:07:41 +00:00
style: Fix linting errors
- Removed trailing spaces
- Added curly braces for if statement
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
14749414b0
commit
a10cbb59d5
3 changed files with 10 additions and 8 deletions
|
|
@ -138,7 +138,9 @@ export const imageToolSchema = z.object({
|
||||||
format: z.preprocess(
|
format: z.preprocess(
|
||||||
(val) => {
|
(val) => {
|
||||||
// Handle null, undefined, or empty string by returning undefined (will use default)
|
// Handle null, undefined, or empty string by returning undefined (will use default)
|
||||||
if (val === null || val === undefined || val === "") return undefined;
|
if (val === null || val === undefined || val === "") {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
// If the value is not a valid format, fall back to 'png'
|
// If the value is not a valid format, fall back to 'png'
|
||||||
const validFormats = ["png", "jpg", "data"];
|
const validFormats = ["png", "jpg", "data"];
|
||||||
return validFormats.includes(val as string) ? val : "png";
|
return validFormats.includes(val as string) ? val : "png";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue