slightly more helpful error message
This commit is contained in:
parent
12234083ec
commit
c4b44a5109
@ -206,7 +206,13 @@ export class BridgeIDBObjectStore {
|
|||||||
if (key instanceof BridgeIDBKeyRange) {
|
if (key instanceof BridgeIDBKeyRange) {
|
||||||
keyRange = key;
|
keyRange = key;
|
||||||
} else {
|
} else {
|
||||||
keyRange = BridgeIDBKeyRange.only(valueToKey(key));
|
try {
|
||||||
|
keyRange = BridgeIDBKeyRange.only(valueToKey(key));
|
||||||
|
} catch (e) {
|
||||||
|
throw Error(
|
||||||
|
`invalid key (type ${typeof key}) for object store ${this._name}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const recordRequest: RecordGetRequest = {
|
const recordRequest: RecordGetRequest = {
|
||||||
|
Loading…
Reference in New Issue
Block a user