diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-07-31 01:33:23 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-07-31 01:33:23 +0200 |
commit | bcefbd7aab5f33f93d626c6421a1a1218c1a91a2 (patch) | |
tree | c0ac6e5e5fde9f51024ad5409c87b7e01c4af60a /packages/idb-bridge/src/BridgeIDBKeyRange.ts | |
parent | 16ecbc9f177f1f71048840edf9b7af20ace3aad8 (diff) | |
download | wallet-core-bcefbd7aab5f33f93d626c6421a1a1218c1a91a2.tar.xz |
idb-bridge: test cases, package structure and missing functionality
Diffstat (limited to 'packages/idb-bridge/src/BridgeIDBKeyRange.ts')
-rw-r--r-- | packages/idb-bridge/src/BridgeIDBKeyRange.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/idb-bridge/src/BridgeIDBKeyRange.ts b/packages/idb-bridge/src/BridgeIDBKeyRange.ts index 2b32c7e0a..4055e092a 100644 --- a/packages/idb-bridge/src/BridgeIDBKeyRange.ts +++ b/packages/idb-bridge/src/BridgeIDBKeyRange.ts @@ -113,21 +113,20 @@ class BridgeIDBKeyRange { static _valueToKeyRange(value: any, nullDisallowedFlag: boolean = false) { if (value instanceof BridgeIDBKeyRange) { - return value; + return value; } if (value === null || value === undefined) { - if (nullDisallowedFlag) { - throw new DataError(); - } - return new BridgeIDBKeyRange(undefined, undefined, false, false); + if (nullDisallowedFlag) { + throw new DataError(); + } + return new BridgeIDBKeyRange(undefined, undefined, false, false); } const key = valueToKey(value); return BridgeIDBKeyRange.only(key); } - } export default BridgeIDBKeyRange; |