web: fix cannot read property clear of undefined when pressing fix it

This commit is contained in:
Abdullah Atta
2024-11-25 12:31:38 +05:00
parent b7f1f36090
commit f7c097988a

View File

@@ -371,8 +371,8 @@ class KeyStore extends BaseStore<KeyStore> {
};
clear = async () => {
await this.#metadataStore.clear();
await this.#secretStore.clear();
await this.#metadataStore?.clear();
await this.#secretStore?.clear();
this.#key = undefined;
this.set({ credentials: [], secrets: {}, isLocked: false });
};