safari-14-idb-fix
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -10,5 +10,5 @@ 'use strict'; | ||
function idbReady() { | ||
var isSafari = !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent); // No point putting other browsers through this mess. | ||
var isSafari = !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent); // No point putting other browsers or older versions of Safari through this mess. | ||
if (!isSafari) return Promise.resolve(); | ||
if (!isSafari || !indexedDB.databases) return Promise.resolve(); | ||
var intervalId; | ||
@@ -15,0 +15,0 @@ return new Promise(function (resolve) { |
@@ -13,4 +13,4 @@ 'use strict'; | ||
!/Chrom(e|ium)\//.test(navigator.userAgent); | ||
// No point putting other browsers through this mess. | ||
if (!isSafari) | ||
// No point putting other browsers or older versions of Safari through this mess. | ||
if (!isSafari || !indexedDB.databases) | ||
return Promise.resolve(); | ||
@@ -17,0 +17,0 @@ let intervalId; |
@@ -8,5 +8,5 @@ /** | ||
function idbReady() { | ||
var isSafari = !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent); // No point putting other browsers through this mess. | ||
var isSafari = !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent); // No point putting other browsers or older versions of Safari through this mess. | ||
if (!isSafari) return Promise.resolve(); | ||
if (!isSafari || !indexedDB.databases) return Promise.resolve(); | ||
var intervalId; | ||
@@ -13,0 +13,0 @@ return new Promise(function (resolve) { |
@@ -11,4 +11,4 @@ /** | ||
!/Chrom(e|ium)\//.test(navigator.userAgent); | ||
// No point putting other browsers through this mess. | ||
if (!isSafari) | ||
// No point putting other browsers or older versions of Safari through this mess. | ||
if (!isSafari || !indexedDB.databases) | ||
return Promise.resolve(); | ||
@@ -15,0 +15,0 @@ let intervalId; |
@@ -1,1 +0,1 @@ | ||
var idbReady=function(){"use strict";return function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)?new Promise((function(n){var r=function(){return indexedDB.databases().finally(n)};e=setInterval(r,100),r()})).finally((function(){return clearInterval(e)})):Promise.resolve()}}(); | ||
var idbReady=function(){"use strict";return function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(n){var t=function(){return indexedDB.databases().finally(n)};e=setInterval(t,100),t()})).finally((function(){return clearInterval(e)})):Promise.resolve()}}(); |
@@ -1,1 +0,1 @@ | ||
var idbReady=function(){"use strict";return function(){if(!(!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)))return Promise.resolve();let e;return new Promise((t=>{const r=()=>indexedDB.databases().finally(t);e=setInterval(r,100),r()})).finally((()=>clearInterval(e)))}}(); | ||
var idbReady=function(){"use strict";return function(){if(!(!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent))||!indexedDB.databases)return Promise.resolve();let e;return new Promise((t=>{const a=()=>indexedDB.databases().finally(t);e=setInterval(a,100),a()})).finally((()=>clearInterval(e)))}}(); |
{ | ||
"name": "safari-14-idb-fix", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Working around a Safari 14 IndexedDB bug", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/jakearchibald/safari-14-idb-fix", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24022