Merge branch 'bugfix/storage-helper-falsy-values' into feature/vitest

This commit is contained in:
koloml committed 2025-02-21 00:36:27 +04:00
commit 840202396e
1 file changed
+1 -1
+1 -1
View File
@@ -22,7 +22,7 @@ export default class StorageHelper {
* @return The JSON object or the default value if the entry does not exist.
*/
async read<Type = any, DefaultType = any>(key: string, defaultValue: DefaultType | null = null): Promise<Type | DefaultType> {
return (await this.#storageArea.get(key))?.[key] || defaultValue;
return (await this.#storageArea.get(key))?.[key] ?? defaultValue;
}
/**