diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-04-25 11:31:35 +0100 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-04-25 11:44:24 +0100 |
| commit | 4fe8a260817d30385cddecad91a4e84c15889666 (patch) | |
| tree | 70ef7d0215767befa923b41b53cff67a5130eda2 /packages/frontend/src/scripts/idb-proxy.ts | |
| parent | Merge branch 'develop' into future-2024-04-10-post (diff) | |
| parent | feat: improve emoji endpoint (#13742) (diff) | |
| download | sharkey-4fe8a260817d30385cddecad91a4e84c15889666.tar.gz sharkey-4fe8a260817d30385cddecad91a4e84c15889666.tar.bz2 sharkey-4fe8a260817d30385cddecad91a4e84c15889666.zip | |
Merge remote-tracking branch 'misskey/develop' into future-2024-04-25
Diffstat (limited to 'packages/frontend/src/scripts/idb-proxy.ts')
| -rw-r--r-- | packages/frontend/src/scripts/idb-proxy.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/idb-proxy.ts b/packages/frontend/src/scripts/idb-proxy.ts index 1ca0990ba9..6b511f2a5f 100644 --- a/packages/frontend/src/scripts/idb-proxy.ts +++ b/packages/frontend/src/scripts/idb-proxy.ts @@ -15,6 +15,16 @@ const fallbackName = (key: string) => `idbfallback::${key}`; let idbAvailable = typeof window !== 'undefined' ? !!(window.indexedDB && window.indexedDB.open) : true; +// iframe.contentWindow.indexedDB.deleteDatabase() がchromeのバグで使用できないため、indexedDBを無効化している。 +// バグが治って再度有効化するのであれば、cypressのコマンド内のコメントアウトを外すこと +// see https://github.com/misskey-dev/misskey/issues/13605#issuecomment-2053652123 +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-expect-error +if (window.Cypress) { + idbAvailable = false; + console.log('Cypress detected. It will use localStorage.'); +} + if (idbAvailable) { await iset('idb-test', 'test') .catch(err => { |