Skip to content

Commit b8c237d

Browse files
Update clients/typescript/contextforgeClient.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 0c02fbc commit b8c237d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clients/typescript/contextforgeClient.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,7 @@ export class ContextForgeClient {
524524
if (!phase || !['planning', 'execution', 'review'].includes(phase)) {
525525
throw new Error('phase must be one of: planning, execution, review');
526526
}
527-
if (summary !== undefined && typeof summary !== 'string') {
528-
throw new Error('summary must be a string when provided');
529-
}
530-
if (summary !== undefined && summary.trim() === '') {
527+
if (summary !== undefined && (typeof summary !== 'string' || summary.trim() === '')) {
531528
throw new Error('summary must be a non-empty string when provided');
532529
}
533530

0 commit comments

Comments
 (0)