aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/fetchAsync.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-07-21 02:58:38 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-07-21 02:58:38 +0800
commit6ca2a02766a842b6a85eb36b9741ccc8ce225bef (patch)
treecd16f2fd728c4653f4b42eefd7de246c87170593 /packages/utils/src/fetchAsync.ts
parentd9a282bd92c155edba0fafe688df85a5576f210a (diff)
downloaddexon-0x-contracts-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.tar.gz
dexon-0x-contracts-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.tar.zst
dexon-0x-contracts-6ca2a02766a842b6a85eb36b9741ccc8ce225bef.zip
Add AbortController polyfill to fetchAsync in utils
Diffstat (limited to 'packages/utils/src/fetchAsync.ts')
-rw-r--r--packages/utils/src/fetchAsync.ts3
1 files changed, 3 insertions, 0 deletions
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,