typihg nsi ihard

This commit is contained in:
Caleb Owens 2024-11-05 16:45:54 +01:00
parent de47b68e9b
commit 4624dc1eb3

View File

@ -78,7 +78,7 @@ export class AppSettings {
} }
async storeValueWithDefault<T>(initial: T, key: string): Promise<T> { async storeValueWithDefault<T>(initial: T, key: string): Promise<T> {
const stored = this.diskStore?.get(key) as T; const stored = (await this.diskStore?.get(key)) as T;
return stored === null ? initial : stored; return stored === null || stored === undefined ? initial : stored;
} }
} }