Skip to content

Commit 83ef7a0

Browse files
roottoolclaude
andauthored
refactor: Simplify return statement with ternary operator (#11)
Co-authored-by: Claude Sonnet 4.5 <[email protected]>
1 parent 0c1a59c commit 83ef7a0

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/parse.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,13 @@ export function parse(formData: FormData): ParseResult {
5454
data[key] = value;
5555
}
5656

57-
if (issues.length > 0) {
58-
return {
59-
data: null,
60-
issues,
61-
};
62-
}
63-
64-
return {
65-
data,
66-
issues: [],
67-
};
57+
return issues.length > 0
58+
? {
59+
data: null,
60+
issues,
61+
}
62+
: {
63+
data,
64+
issues: [],
65+
};
6866
}

0 commit comments

Comments
 (0)