mirror of
https://github.com/bitwarden/jslib
synced 2025-12-06 00:03:29 +00:00
copy default options (#764)
This commit is contained in:
committed by
Kyle Spearrin
parent
e595c0548e
commit
ddccb41914
@@ -180,7 +180,7 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
|
|||||||
async getOptions(): Promise<[any, PasswordGeneratorPolicyOptions]> {
|
async getOptions(): Promise<[any, PasswordGeneratorPolicyOptions]> {
|
||||||
let options = await this.stateService.getPasswordGenerationOptions();
|
let options = await this.stateService.getPasswordGenerationOptions();
|
||||||
if (options == null) {
|
if (options == null) {
|
||||||
options = DefaultOptions;
|
options = Object.assign({}, DefaultOptions);
|
||||||
} else {
|
} else {
|
||||||
options = Object.assign({}, DefaultOptions, options);
|
options = Object.assign({}, DefaultOptions, options);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export class UsernameGenerationService implements BaseUsernameGenerationService
|
|||||||
async getOptions(): Promise<any> {
|
async getOptions(): Promise<any> {
|
||||||
let options = await this.stateService.getUsernameGenerationOptions();
|
let options = await this.stateService.getUsernameGenerationOptions();
|
||||||
if (options == null) {
|
if (options == null) {
|
||||||
options = DefaultOptions;
|
options = Object.assign({}, DefaultOptions);
|
||||||
} else {
|
} else {
|
||||||
options = Object.assign({}, DefaultOptions, options);
|
options = Object.assign({}, DefaultOptions, options);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user