Skip to content

Commit

Permalink
fix standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Oct 4, 2023
1 parent c69c624 commit 2023a9d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions generators/ionic/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@ export default class extends BaseApplicationGenerator {
// No entities.
}
}
if (this.backendConfig.entities && !this.jhipsterConfig.entities) {
if (this.backendConfig?.entities && !this.jhipsterConfig.entities) {
this.jhipsterConfig.entities = this.backendConfig.entities;
}
if (this.backendConfig.baseName && !this.jhipsterConfig.projectName) {
if (this.backendConfig?.baseName && !this.jhipsterConfig.projectName) {
this.jhipsterConfig.projectName = `${startCase(this.backendConfig.baseName)}Ionic`;
}
if (this.backendConfig.authenticationType) {
if (this.backendConfig?.authenticationType) {
this.jhipsterConfig.authenticationType = this.backendConfig.authenticationType;
}
if (this.jhipsterConfig.enableTranslation === undefined && this.backendConfig.enableTranslation !== undefined) {
if (this.jhipsterConfig.enableTranslation === undefined && this.backendConfig?.enableTranslation !== undefined) {
this.jhipsterConfig.enableTranslation = this.backendConfig.enableTranslation;
}

// Set default baseName.
if (this.backendConfig.baseName && !this.jhipsterConfig.baseName) {
if (this.backendConfig?.baseName && !this.jhipsterConfig.baseName) {
this.jhipsterConfig.baseName = `${this.backendConfig.baseName}Ionic`;
}

Expand All @@ -105,7 +105,7 @@ export default class extends BaseApplicationGenerator {
this.jhipsterConfig.blueprints = [...(localBlueprints || []), { name: 'generator-jhipster-ionic' }];
}

if (this.backendConfig.baseName && this.ionicConfig.appDir) {
if (this.backendConfig?.baseName && this.ionicConfig.appDir) {
const ionicDir = relative(this.destinationPath(this.ionicConfig.appDir), this.destinationPath());

// Add back reference
Expand Down

0 comments on commit 2023a9d

Please sign in to comment.