no need for try catch here as we already catch in getKeys

This commit is contained in:
Bruno Windels 2021-09-22 10:38:29 +02:00
parent ac5a4c2bc6
commit 498c00fe3c

View file

@ -201,14 +201,10 @@ export class Store<T> extends QueryTarget<T> {
} }
reqAsPromise(request).catch(err => { reqAsPromise(request).catch(err => {
let keys : IDBKey[] | undefined = undefined; let keys : IDBKey[] | undefined = undefined;
try { if (value) {
if (value) { keys = this._getKeys(value);
keys = this._getKeys(value); } else if (key) {
} else if (key) { keys = [key];
keys = [key];
}
} catch (err) {
console.error("_getKeys failed", err);
} }
this._transaction.addWriteError(err, log, operationName, keys); this._transaction.addWriteError(err, log, operationName, keys);
}); });