fix: update usage of safari-14-idb-fix (#2072)
* chore: update deps * fix: fix dep path * fix: fix import * fix: fix pkg
This commit is contained in:
parent
d30f7f4b1a
commit
821b785e6b
|
@ -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')
|
||||
|
|
|
@ -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()
|
||||
}
|
Loading…
Reference in a new issue