fix: update usage of safari-14-idb-fix (#2072)

* chore: update deps

* fix: fix dep path

* fix: fix import

* fix: fix pkg
volta
Nolan Lawson 2021-07-16 07:42:32 -07:00 zatwierdzone przez GitHub
rodzic d30f7f4b1a
commit 821b785e6b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 1 dodań i 15 usunięć

Wyświetl plik

@ -6,7 +6,7 @@ import './routes/_utils/forceOnline.js'
import { mark, stop } from './routes/_utils/marks.js'
import { loadPolyfills } from './routes/_utils/polyfills/loadPolyfills.js'
import { loadNonCriticalPolyfills } from './routes/_utils/polyfills/loadNonCriticalPolyfills.js'
import { idbReady } from './routes/_utils/idbReady.js'
import idbReady from 'safari-14-idb-fix/dist/esm'
Promise.all([idbReady(), loadPolyfills()]).then(() => {
mark('sapperStart')

Wyświetl plik

@ -1,14 +0,0 @@
import safariIdbReady from 'safari-14-idb-fix'
import { isWebKit } from './userAgent/isWebKit.js'
// workaround for a safari 14 bug, see https://github.com/jakearchibald/safari-14-idb-fix
export async function idbReady () {
if (!isWebKit()) {
return
}
if (typeof indexedDB === 'undefined' || !indexedDB.databases) {
// fix for https://github.com/jakearchibald/safari-14-idb-fix/pull/2
return
}
await safariIdbReady()
}