diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-07-21 02:58:38 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-07-21 02:58:38 +0800 |
commit | 6ca2a02766a842b6a85eb36b9741ccc8ce225bef (patch) | |
tree | cd16f2fd728c4653f4b42eefd7de246c87170593 | |
parent | d9a282bd92c155edba0fafe688df85a5576f210a (diff) | |
download | dexon-sol-tools-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.tar dexon-sol-tools-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.tar.gz dexon-sol-tools-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.tar.bz2 dexon-sol-tools-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.tar.lz dexon-sol-tools-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.tar.xz dexon-sol-tools-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.tar.zst dexon-sol-tools-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.zip |
Add AbortController polyfill to fetchAsync in utils
-rw-r--r-- | packages/utils/package.json | 1 | ||||
-rw-r--r-- | packages/utils/src/fetchAsync.ts | 3 | ||||
-rw-r--r-- | yarn.lock | 4 |
3 files changed, 8 insertions, 0 deletions
diff --git a/packages/utils/package.json b/packages/utils/package.json index 7e3d46ce7..382604fdd 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -38,6 +38,7 @@ "@0xproject/types": "^1.0.0-rc.1", "@0xproject/typescript-typings": "^1.0.0", "@types/node": "^8.0.53", + "abortcontroller-polyfill": "^1.1.9", "bignumber.js": "~4.1.0", "detect-node": "2.0.3", "ethereum-types": "^1.0.0", diff --git a/packages/utils/src/fetchAsync.ts b/packages/utils/src/fetchAsync.ts index c02e5baba..b4c85718d 100644 --- a/packages/utils/src/fetchAsync.ts +++ b/packages/utils/src/fetchAsync.ts @@ -1,5 +1,8 @@ import isNode = require('detect-node'); import 'isomorphic-fetch'; +// WARNING: This needs to be imported after isomorphic-fetch: https://github.com/mo/abortcontroller-polyfill#using-it-on-browsers-without-fetch +// tslint:disable-next-line:ordered-imports +import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'; export const fetchAsync = async ( endpoint: string, @@ -1231,6 +1231,10 @@ abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" +abortcontroller-polyfill@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.1.9.tgz#9fefe359fda2e9e0932dc85e6106453ac393b2da" + abstract-leveldown@0.12.3: version "0.12.3" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-0.12.3.tgz#116b1ec5c7710ef7a2d5706768bbdb4440be1070" |