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
1 changed files with 4 additions and 8 deletions

View File

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