Browse Source

copy default options (#764)

pull/765/head
Kyle Spearrin 4 years ago committed by GitHub
parent
commit
017fb5146f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      common/src/services/passwordGeneration.service.ts
  2. 2
      common/src/services/usernameGeneration.service.ts

2
common/src/services/passwordGeneration.service.ts

@ -180,7 +180,7 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr @@ -180,7 +180,7 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
async getOptions(): Promise<[any, PasswordGeneratorPolicyOptions]> {
let options = await this.stateService.getPasswordGenerationOptions();
if (options == null) {
options = DefaultOptions;
options = Object.assign({}, DefaultOptions);
} else {
options = Object.assign({}, DefaultOptions, options);
}

2
common/src/services/usernameGeneration.service.ts

@ -97,7 +97,7 @@ export class UsernameGenerationService implements BaseUsernameGenerationService @@ -97,7 +97,7 @@ export class UsernameGenerationService implements BaseUsernameGenerationService
async getOptions(): Promise<any> {
let options = await this.stateService.getUsernameGenerationOptions();
if (options == null) {
options = DefaultOptions;
options = Object.assign({}, DefaultOptions);
} else {
options = Object.assign({}, DefaultOptions, options);
}

Loading…
Cancel
Save