From a299737a298a084b8e34a737c02395e2d3191f07 Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 27 Jul 2021 01:49:21 +0900 Subject: [PATCH 1/2] remove debugging code --- src/client/scripts/idb-proxy.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/client/scripts/idb-proxy.ts b/src/client/scripts/idb-proxy.ts index afbbe20795..62a6931ec3 100644 --- a/src/client/scripts/idb-proxy.ts +++ b/src/client/scripts/idb-proxy.ts @@ -4,16 +4,12 @@ import { get as iget, set as iset, del as idel, - createStore } from 'idb-keyval'; const fallbackName = (key: string) => `idbfallback::${key}`; let idbAvailable = typeof window !== 'undefined' ? !!window.indexedDB : true; -console.log(window.indexedDB); -console.log(idbAvailable); - if (idbAvailable) { try { const request = indexedDB.open('keyval-store'); @@ -23,12 +19,11 @@ if (idbAvailable) { request.onsuccess = (e) => res(e); }); } catch (e) { - console.log('catch', e) + console.error('idb open error', e) idbAvailable = false; } } -console.log(idbAvailable); if (!idbAvailable) console.error('indexedDB is unavailable. It will use localStorage.'); export async function get(key: string) { From ba756204b77ce6e1189b8443e9641f2d02119621 Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 27 Jul 2021 01:49:39 +0900 Subject: [PATCH 2/2] fix lint --- src/client/scripts/idb-proxy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/scripts/idb-proxy.ts b/src/client/scripts/idb-proxy.ts index 62a6931ec3..6a3acc9894 100644 --- a/src/client/scripts/idb-proxy.ts +++ b/src/client/scripts/idb-proxy.ts @@ -19,7 +19,7 @@ if (idbAvailable) { request.onsuccess = (e) => res(e); }); } catch (e) { - console.error('idb open error', e) + console.error('idb open error', e); idbAvailable = false; } }