Skip to content

Commit ba0ac3e

Browse files
committed
per string file name validation (greptile comment)
1 parent 4ae1b27 commit ba0ac3e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/lib/file.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ export class FileAPI {
317317
if (!Array.isArray(fileNames) || fileNames.length === 0) {
318318
throw new JunoValidationError('fileNames must be a non-empty array');
319319
}
320+
fileNames.forEach((name) =>
321+
validateString(name, 'each entry in fileNames must be a non-empty string')
322+
);
320323

321324
const headers: Record<string, string> = {};
322325
if (credentials?.userJwt) {

0 commit comments

Comments
 (0)