From 683db0234fe1804b960d589bb87f2d20b3c4def9 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 26 Nov 2020 23:35:46 +0300 Subject: [PATCH] getAllKeys is implemented since Chrome48, FF44 --- background/db.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/background/db.js b/background/db.js index 3f7f70ba..3b6f8bc3 100644 --- a/background/db.js +++ b/background/db.js @@ -38,11 +38,9 @@ const db = (() => { } async function testDB() { - let e = await dbExecIndexedDB('getAllKeys', IDBKeyRange.lowerBound(1), 1); - e = e[0]; // throws if result is null const id = `${performance.now()}.${Math.random()}.${Date.now()}`; await dbExecIndexedDB('put', {id}); - e = await dbExecIndexedDB('get', id); + const e = await dbExecIndexedDB('get', id); await dbExecIndexedDB('delete', e.id); // throws if `e` or id is null }