diff --git a/common/src/services/passwordGeneration.service.ts b/common/src/services/passwordGeneration.service.ts index fa03446f6a..c752fcd98b 100644 --- a/common/src/services/passwordGeneration.service.ts +++ b/common/src/services/passwordGeneration.service.ts @@ -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); } diff --git a/common/src/services/usernameGeneration.service.ts b/common/src/services/usernameGeneration.service.ts index d09721b58b..e4201d6e86 100644 --- a/common/src/services/usernameGeneration.service.ts +++ b/common/src/services/usernameGeneration.service.ts @@ -97,7 +97,7 @@ export class UsernameGenerationService implements BaseUsernameGenerationService async getOptions(): Promise { let options = await this.stateService.getUsernameGenerationOptions(); if (options == null) { - options = DefaultOptions; + options = Object.assign({}, DefaultOptions); } else { options = Object.assign({}, DefaultOptions, options); }