File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -305,10 +305,9 @@ module.exports = class CloudCommand extends CLICommandBase {
305
305
throw normalizedApiError ( error ) ;
306
306
}
307
307
308
- const validTargets = data . versions . filter ( ( t ) => t . release_state !== 'archived' ) ;
309
- const validTarget = validTargets . filter ( ( t ) => t . version === target ) ;
308
+ const validTarget = data ?. versions ?. filter ( ( t ) => t . version === target ) ;
310
309
if ( ! validTarget . length ) {
311
- throw new VError ( [ 'Invalid build target version.' , 'Valid targets:' ] . concat ( validTargets . map ( ( v ) => `${ v . version } ${ v . release_state === 'preview' ? '(preview)' : '' } ` ) ) . join ( '\n' ) ) ;
310
+ throw new VError ( [ 'Invalid build target version.' , 'Valid targets:' ] . concat ( data . versions . map ( ( v ) => `${ v . version } ${ v . release_state === 'preview' ? '(preview)' : '' } ` ) ) . join ( '\n' ) ) ;
312
311
}
313
312
targetVersion = validTarget [ 0 ] . version ;
314
313
this . ui . stdout . write ( `Targeting version: ${ targetVersion } ${ os . EOL } ` ) ;
You can’t perform that action at this time.
0 commit comments