Skip to content

Commit

Permalink
chore(release): Adjust expression
Browse files Browse the repository at this point in the history
  • Loading branch information
nduchak committed May 29, 2020
1 parent 6fb4a4d commit 10406b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions es/utils/aepp-wallet-communication/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import { isMemoryAccount } from '../../account/selector'
const isWeb = () => location && location.protocol && location.protocol.startsWith('http')

export const getBrowserAPI = (force = false) => {
const window = getWindow(force)
// Chrome, Opera support
if (window && window.chrome === Object(window.chrome)) return window.chrome
if (typeof chrome !== 'undefined' && chrome === Object(chrome)) return chrome
// Firefox support
if (window && window.browser === Object(window.browser)) return window.browser
if (typeof browser !== 'undefined' && browser === Object(browser)) return browser
if (!force) throw new Error('Browser is not detected')
return {}
}
Expand Down

0 comments on commit 10406b9

Please sign in to comment.