File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ export function processInput(originalInput: Partial<Input>): Input {
1515
1616 // actors can be a string or an array of strings
1717 if ( input . actors && typeof input . actors === 'string' ) {
18- input . actors = input . actors . split ( ',' ) . map ( ( format : string ) => format . trim ( ) ) as string [ ] ;
18+ /**
19+ * Filter out empty strings to prevent invalid Actor API error.
20+ */
21+ input . actors = input . actors . split ( ',' ) . map ( ( format : string ) => format . trim ( ) ) . filter ( ( actor ) => actor !== '' ) as string [ ] ;
1922 }
2023 /**
2124 * Replace empty string with empty array to prevent invalid Actor API error.
@@ -37,7 +40,10 @@ export function processInput(originalInput: Partial<Input>): Input {
3740 }
3841
3942 if ( input . tools && typeof input . tools === 'string' ) {
40- input . tools = input . tools . split ( ',' ) . map ( ( tool : string ) => tool . trim ( ) ) as ToolCategory [ ] ;
43+ /**
44+ * Filter out empty strings just in case.
45+ */
46+ input . tools = input . tools . split ( ',' ) . map ( ( tool : string ) => tool . trim ( ) ) . filter ( ( tool ) => tool !== '' ) as ToolCategory [ ] ;
4147 }
4248 return input ;
4349}
You can’t perform that action at this time.
0 commit comments