File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,10 @@ export function verifyFigmaWebConfig(ctx: Context) {
107107 if ( c . screenshot_names && c . screenshot_names . length > 0 && c . figma_ids && c . figma_ids . length != c . screenshot_names . length ) {
108108 throw new Error ( "Mismatch in Figma Ids and Screenshot Names in figma config" ) ;
109109 }
110- for ( const name of c . screenshot_names ) {
111- screenshots . push ( name ) ;
110+ if ( isValidArray ( c . screenshot_names ) ) {
111+ for ( const name of c . screenshot_names ) {
112+ screenshots . push ( name ) ;
113+ }
112114 }
113115 }
114116
@@ -117,4 +119,8 @@ export function verifyFigmaWebConfig(ctx: Context) {
117119 }
118120
119121 return true ;
120- } ;
122+ } ;
123+
124+ function isValidArray ( input ) {
125+ return Array . isArray ( input ) && input . length > 0 ;
126+ }
You can’t perform that action at this time.
0 commit comments