File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ export async function askForLanguages(this: LanguagesGenerator, { control }) {
5454 const currentLanguages = this . jhipsterConfig . languages ?? [ ] ;
5555 const answers = await this . prompt ( [
5656 {
57+ when : this . jhipsterConfigWithDefaults . enableTranslation ,
5758 type : 'checkbox' ,
5859 name : 'languages' ,
5960 message : 'Please choose additional languages to install' ,
@@ -67,9 +68,11 @@ export async function askForLanguages(this: LanguagesGenerator, { control }) {
6768 default : ( ) => this . jhipsterConfigWithDefaults . languages ,
6869 } ,
6970 ] ) ;
70- if ( control . existingProject ) {
71- this . languagesToApply . push ( ...answers . languages . filter ( newLang => ! currentLanguages . includes ( newLang ) ) ) ;
72- } else {
73- this . languagesToApply . push ( ...answers . languages ) ;
71+ if ( answers . languages ) {
72+ if ( control . existingProject ) {
73+ this . languagesToApply . push ( ...answers . languages . filter ( newLang => ! currentLanguages . includes ( newLang ) ) ) ;
74+ } else {
75+ this . languagesToApply . push ( ...answers . languages ) ;
76+ }
7477 }
7578}
You can’t perform that action at this time.
0 commit comments