Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing ie8 error #87

Closed
wants to merge 1 commit into from
Closed

Fixing ie8 error #87

wants to merge 1 commit into from

Conversation

jinzhubaofu
Copy link

there are errors on ie8 when using the minified version.

the source code here

var axios = module.exports = function axios(config) {
   // operations with axios
}

will be minifed into

var a = module.exports = function b(config) {
  // operations with b
  // but a !== b and b.interceptors undefined on ie8
};

but on ie8, in the function b, a !== b, b has no attributes like interceptors, so it will crash.

I write a demo, you can check it out here

just remove function name axios will be ok.

@mzabriskie
Copy link
Member

Thanks for the PR. Can you remove the dist/ folder. This should only be updated when releasing. Also, I think I would prefer module.exports = function axios, as opposed to using an anonymous function.

@axios axios locked and limited conversation to collaborators May 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants