File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/@angular/cli/commands Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,11 @@ export default Command.extend({
6464 ] ,
6565
6666 getCollectionName ( rawArgs : string [ ] , parsedOptions ?: { collection ?: string } ) : [ string , string ] {
67+ let collectionName : string = CliConfig . getValue ( 'defaults.schematics.collection' ) ;
68+ if ( ! rawArgs || rawArgs . length === 0 ) {
69+ return [ collectionName , null ] ;
70+ }
6771 let schematicName = rawArgs [ 0 ] ;
68- let collectionName = CliConfig . getValue ( 'defaults.schematics.collection' ) ;
6972
7073 if ( schematicName . match ( / : / ) ) {
7174 [ collectionName , schematicName ] = schematicName . split ( ':' , 2 ) ;
@@ -206,7 +209,7 @@ export default Command.extend({
206209
207210 printDetailedHelp : function ( _options : any , rawArgs : any ) : string | Promise < string > {
208211 const engineHost = getEngineHost ( ) ;
209- const collectionName = this . getCollectionName ( ) ;
212+ const [ collectionName ] = this . getCollectionName ( ) ;
210213 const collection = getCollection ( collectionName ) ;
211214 const schematicName = rawArgs [ 1 ] ;
212215 if ( schematicName ) {
You can’t perform that action at this time.
0 commit comments