Skip to content
Snippets Groups Projects
Unverified Commit 597c9761 authored by tamaina's avatar tamaina Committed by GitHub
Browse files

Revert "Revert "Fix idb"" (#7860)

This reverts commit 67875e2a.
parent b875cc99
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,6 @@ import {
get as iget,
set as iset,
del as idel,
createStore,
} from 'idb-keyval';
const fallbackName = (key: string) => `idbfallback::${key}`;
......@@ -13,9 +12,9 @@ let idbAvailable = typeof window !== 'undefined' ? !!window.indexedDB : true;
if (idbAvailable) {
try {
await createStore('keyval-store', 'keyval');
await iset('idb-test', 'test');
} catch (e) {
console.error('idb open error', e);
console.error('idb error', e);
idbAvailable = false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment