Skip to content

Commit a912c53

Browse files
Update packages/server/src/api/rpc/index.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent c6de79f commit a912c53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/server/src/api/rpc/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export class RPCApiHandler<Schema extends SchemaDef = SchemaDef> implements ApiH
240240
if (!this.isValidModel(client, lowerCaseFirst(itemModel))) {
241241
return this.makeBadInputErrorResponse(`operation at index ${i} has unknown model: ${itemModel}`);
242242
}
243-
if (itemArgs !== undefined && itemArgs !== null && typeof itemArgs !== 'object') {
243+
if (itemArgs !== undefined && itemArgs !== null && (typeof itemArgs !== 'object' || Array.isArray(itemArgs))) {
244244
return this.makeBadInputErrorResponse(`operation at index ${i} has invalid "args" field`);
245245
}
246246

0 commit comments

Comments
 (0)