From 89ef279ffb6029271f55fb6d8b990ffe494cd862 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Tue, 14 Nov 2017 10:50:29 -0800 Subject: [PATCH] Prefer native fetch --- ui/app/services/token.js | 2 +- ui/app/utils/fetch.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 ui/app/utils/fetch.js diff --git a/ui/app/services/token.js b/ui/app/services/token.js index cd2b66723..be1da0c90 100644 --- a/ui/app/services/token.js +++ b/ui/app/services/token.js @@ -1,5 +1,5 @@ import Ember from 'ember'; -import fetch from 'fetch'; +import fetch from 'nomad-ui/utils/fetch'; const { Service, computed, assign } = Ember; diff --git a/ui/app/utils/fetch.js b/ui/app/utils/fetch.js new file mode 100644 index 000000000..468f1b523 --- /dev/null +++ b/ui/app/utils/fetch.js @@ -0,0 +1,6 @@ +import fetch from 'fetch'; + +// The ember-fetch polyfill does not provide streaming +const fetchToUse = window.fetch || fetch; + +export default fetchToUse;