mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-26 17:08:33 +01:00
dont init history
This commit is contained in:
parent
acb7b7b8e3
commit
80cd30d7d8
@ -148,7 +148,7 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
|
||||
}
|
||||
|
||||
private optionsCache: any;
|
||||
private history: PasswordHistory[] = [];
|
||||
private history: PasswordHistory[];
|
||||
|
||||
constructor(private cryptoService: CryptoService, private storageService: StorageService) {
|
||||
}
|
||||
@ -203,11 +203,11 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
|
||||
return;
|
||||
}
|
||||
|
||||
currentHistory.push(new PasswordHistory(password, Date.now()));
|
||||
currentHistory.unshift(new PasswordHistory(password, Date.now()));
|
||||
|
||||
// Remove old items.
|
||||
if (currentHistory.length > MaxPasswordsInHistory) {
|
||||
currentHistory.shift();
|
||||
currentHistory.pop();
|
||||
}
|
||||
|
||||
const newHistory = await this.encryptHistory(currentHistory);
|
||||
|
Loading…
Reference in New Issue
Block a user