Skip to content

Commit

Permalink
simplify isChrome check
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex authored and dfahlander committed Aug 2, 2021
1 parent a24e60c commit 50f491a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/dexie-unittest-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function deleteDatabase(db) {

export const isIE = !(window.ActiveXObject) && "ActiveXObject" in window;
export const isEdge = /Edge\/\d+/.test(navigator.userAgent);
export const isChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
export const isChrome = !!window.chrome;
var hasPolyfillIE = [].slice.call(document.getElementsByTagName("script")).some(
s => s.src.indexOf("idb-iegap") !== -1);

Expand All @@ -150,8 +150,6 @@ export function supports (features) {
}
case "domevents":
return typeof window === 'object' && window.addEventListener;
case "transactiondurability":
return IDBTransaction.prototype.durability === 'default';

default:
throw new Error ("Unknown feature: " + feature);
Expand Down

0 comments on commit 50f491a

Please sign in to comment.