diff --git a/app/scripts/background.js b/app/scripts/background.js index db2d9e8bb..37ccba44e 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -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') diff --git a/app/scripts/ui.js b/app/scripts/ui.js index a99da37a0..0fe92d47c 100644 --- a/app/scripts/ui.js +++ b/app/scripts/ui.js @@ -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') diff --git a/package.json b/package.json index 9b4737ef5..d3ae90618 100644 --- a/package.json +++ b/package.json @@ -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", @@ -180,7 +181,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",