diff --git a/lib/storage/providers/IDBKeyVal.js b/lib/storage/providers/IDBKeyVal.js index 5983b5b1..1b13592f 100644 --- a/lib/storage/providers/IDBKeyVal.js +++ b/lib/storage/providers/IDBKeyVal.js @@ -102,7 +102,10 @@ const provider = { * @param {String} key * @return {Promise<*>} */ - getItem: key => get(key, getCustomStore()), + getItem: key => get(key, getCustomStore()) + + // idb-keyval returns undefined for missing items, but this needs to return null so that idb-keyval does the same thing as SQLiteStorage. + .then(val => (val === undefined ? null : val)), /** * Remove given key and it's value from storage