mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
+8
-1
@@ -5,7 +5,14 @@ var dispatchRequest = require('./core/dispatchRequest');
|
|||||||
var InterceptorManager = require('./core/InterceptorManager');
|
var InterceptorManager = require('./core/InterceptorManager');
|
||||||
|
|
||||||
// Polyfill ES6 Promise if needed
|
// Polyfill ES6 Promise if needed
|
||||||
require('es6-promise').polyfill();
|
(function () {
|
||||||
|
// webpack is being used to set es6-promise to the native Promise
|
||||||
|
// for the standalone build. It's necessary to make sure polyfill exists.
|
||||||
|
var P = require('es6-promise');
|
||||||
|
if (P && typeof P.polyfill === 'function') {
|
||||||
|
P.polyfill();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
var axios = module.exports = function axios(config) {
|
var axios = module.exports = function axios(config) {
|
||||||
config = utils.merge({
|
config = utils.merge({
|
||||||
|
|||||||
Reference in New Issue
Block a user