Skip to content

Commit

Permalink
fix(core): handle datastore errors even if the versions of core and d…
Browse files Browse the repository at this point in the history
…atastore-base don't match
  • Loading branch information
quentinvernot committed Jan 16, 2025
1 parent 3d9def2 commit 26cc42c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/LocalUser/KeyStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class KeyStore {
record = await this._ds.get(TABLE, 'keySafe');
} catch (e) {
// Stop if any real db error
if (!(e instanceof dbErrors.RecordNotFound)) {
if (!((e instanceof dbErrors.RecordNotFound) || (typeof e === 'object' && e !== null && 'name' in e && e.name === 'RecordNotFound'))) {
console.error('Could not read keysafe from keystore');
throw e;
}
Expand Down

0 comments on commit 26cc42c

Please sign in to comment.