diff --git a/actions/new.action.ts b/actions/new.action.ts index 1105155ad..5191583c7 100644 --- a/actions/new.action.ts +++ b/actions/new.action.ts @@ -109,10 +109,10 @@ const generateApplicationFiles = async ( args: CommandStorage, options: CommandStorage, ) => { - const collectionName = options.get('collection', true)?.value; - const collection: AbstractCollection = CollectionFactory.create( - (collectionName as Collection) || Collection.NESTJS, - ); + const collectionName = + options.get('collection')?.value || Collection.NESTJS; + const collection: AbstractCollection = + CollectionFactory.create(collectionName); const argsAndOptionStorage = new CommandStorage(); argsAndOptionStorage.mergeWith(args);