chore: fixed issue issue where getting payloads would hang if passed an empty array

This commit is contained in:
Aman Harwara
2023-09-05 21:29:54 +05:30
parent fc9dc60030
commit cdd90bf393

View File

@@ -145,6 +145,9 @@ export class Database {
}
public async getPayloadsForKeys(keys: string[]): Promise<any[]> {
if (keys.length === 0) {
return []
}
const db = (await this.openDatabase()) as IDBDatabase
return new Promise((resolve) => {
const objectStore = db.transaction(STORE_NAME).objectStore(STORE_NAME)