
BREAKING CHANGE: Node v12.20+, v14.14+, or v16.0+ is required * fix!: remove esm package, use native Node ES modules * fix: fix some CJS imports
14 lines
442 B
JavaScript
14 lines
442 B
JavaScript
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()
|
|
}
|