Skip to content

Commit

Permalink
Add polyfill for AbortController (#7157)
Browse files Browse the repository at this point in the history
The AbortController is used in both the background and the UI. Support
for AbortController was added to Chrome in version 66, which is above
our minimum supported version.

I did consider increasing the minimum Chrome version to 66, but we have
a decent number of users still on Chrome 65 unfortunately.
  • Loading branch information
Gudahtt committed Sep 13, 2019
1 parent da41193 commit c80deaa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// this needs to run before anything else
require('./lib/setupFetchDebugging')()

// polyfills
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'

const urlUtil = require('url')
const endOfStream = require('end-of-stream')
const pump = require('pump')
Expand Down
3 changes: 3 additions & 0 deletions app/scripts/ui.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// polyfills
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'

const PortStream = require('extension-port-stream')
const { getEnvironmentType } = require('./lib/util')
const { ENVIRONMENT_TYPE_NOTIFICATION, ENVIRONMENT_TYPE_FULLSCREEN, ENVIRONMENT_TYPE_POPUP } = require('./lib/enums')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@sentry/browser": "^4.1.1",
"@zxing/library": "^0.8.0",
"abi-decoder": "^1.2.0",
"abortcontroller-polyfill": "^1.3.0",
"asmcrypto.js": "^2.3.2",
"await-semaphore": "^0.1.1",
"bignumber.js": "^4.1.0",
Expand Down Expand Up @@ -181,7 +182,6 @@
"@storybook/addon-info": "^5.1.1",
"@storybook/addon-knobs": "^3.4.2",
"@storybook/react": "^5.1.1",
"abortcontroller-polyfill": "^1.3.0",
"addons-linter": "^1.10.0",
"babel-eslint": "^10.0.2",
"babelify": "^10.0.0",
Expand Down

0 comments on commit c80deaa

Please sign in to comment.