diff --git a/package.json b/package.json index 066ae8adec..5bb4cfe1ec 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "ol": "6.1.1", "pbf": "3.0.2", "proj4": "2.5.0", - "promise-polyfill": "6.0.2", + "promise-polyfill": "8.1.3", "three": "0.92.0", "xlsx": "0.15.1", "xml-js": "1.6.11" diff --git a/src/common/package.json b/src/common/package.json index 616664db13..29d0c50012 100644 --- a/src/common/package.json +++ b/src/common/package.json @@ -16,7 +16,7 @@ "elasticsearch": "16.5.0", "fetch-ie8": "1.5.0", "fetch-jsonp": "1.1.3", - "promise-polyfill": "6.0.2", + "promise-polyfill": "8.1.3", "lodash.topairs": "4.3.0" } } diff --git a/src/common/util/FetchRequest.js b/src/common/util/FetchRequest.js index 9687b1bb20..ded39ac5ca 100644 --- a/src/common/util/FetchRequest.js +++ b/src/common/util/FetchRequest.js @@ -1,8 +1,8 @@ /* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ -import "./PromisePolyfill" -import 'fetch-ie8' +import 'promise-polyfill/dist/polyfill'; +import 'fetch-ie8'; import fetchJsonp from 'fetch-jsonp'; import { SuperMap @@ -427,4 +427,4 @@ SuperMap.Util.RequestJSONPPromise = { }); return me.issue(config); } -}; \ No newline at end of file +}; diff --git a/src/common/util/PromisePolyfill.js b/src/common/util/PromisePolyfill.js deleted file mode 100644 index d9f7c85d0b..0000000000 --- a/src/common/util/PromisePolyfill.js +++ /dev/null @@ -1,6 +0,0 @@ -/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved. - * This program are made available under the terms of the Apache License, Version 2.0 - * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ -import Promise from 'promise-polyfill'; - -window.Promise = Promise; \ No newline at end of file