mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
fix: default single user state saving undefined value to state
This commit is contained in:
@@ -28,7 +28,9 @@ export class DefaultSingleUserState<T>
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override async doStorageSave(newState: T, oldState: T): Promise<void> {
|
protected override async doStorageSave(newState: T, oldState: T): Promise<void> {
|
||||||
|
if (newState != null) {
|
||||||
await super.doStorageSave(newState, oldState);
|
await super.doStorageSave(newState, oldState);
|
||||||
|
}
|
||||||
if (newState != null && oldState == null) {
|
if (newState != null && oldState == null) {
|
||||||
await this.stateEventRegistrarService.registerEvents(this.keyDefinition);
|
await this.stateEventRegistrarService.registerEvents(this.keyDefinition);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user