1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-11 21:29:08 +09:00
This commit is contained in:
tamaina 2021-10-07 14:26:16 +09:00
parent 8d05ef3058
commit dd17065129

View File

@ -4,7 +4,6 @@ import {
get as iget, get as iget,
set as iset, set as iset,
del as idel, del as idel,
createStore,
} from 'idb-keyval'; } from 'idb-keyval';
const fallbackName = (key: string) => `idbfallback::${key}`; const fallbackName = (key: string) => `idbfallback::${key}`;
@ -13,9 +12,9 @@ let idbAvailable = typeof window !== 'undefined' ? !!window.indexedDB : true;
if (idbAvailable) { if (idbAvailable) {
try { try {
await createStore('keyval-store', 'keyval'); await iset('idb-test', 'test');
} catch (e) { } catch (e) {
console.error('idb open error', e); console.error('idb error', e);
idbAvailable = false; idbAvailable = false;
} }
} }