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

fix: location.origin compatible with ie10 #1355

Merged
merged 4 commits into from Oct 31, 2018
Merged

fix: location.origin compatible with ie10 #1355

merged 4 commits into from Oct 31, 2018

Conversation

xiaohuoni
Copy link
Member

@xiaohuoni xiaohuoni commented Oct 29, 2018

Close #1179

@coveralls
Copy link

coveralls commented Oct 29, 2018

Pull Request Test Coverage Report for Build 1824

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 23 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.2%) to 32.98%

Files with Coverage Reduction New Missed Lines %
packages/babel-preset-umi/src/webpack-overrides.js 1 0.0%
packages/umi/src/cli.js 2 0.0%
packages/umi-build-dev/src/getPlugins.js 2 80.88%
packages/af-webpack/src/dev.js 4 0.0%
packages/umi-plugin-locale/src/index.js 4 80.6%
packages/umi-build-dev/src/getConfig/watch.js 10 3.57%
Totals Coverage Status
Change from base Build 1790: -0.2%
Covered Lines: 1056
Relevant Lines: 3280

💛 - Coveralls

@sorrycc
Copy link
Member

sorrycc commented Oct 30, 2018

umi 内置方案里哪里有用到 location.origin 吗?

@xiaohuoni
Copy link
Member Author

publicPathStr = 'location.origin + window.routerBase';

@sorrycc
Copy link
Member

sorrycc commented Oct 30, 2018

这行改成下面的吧,简单一点,

pubicPathStr = `location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + window.routerBase`;

@sorrycc sorrycc changed the title location.origin is undefined [ie10] fix: location.origin compatible with ie10 Oct 30, 2018
@sorrycc
Copy link
Member

sorrycc commented Oct 30, 2018

ci 挂了,用例需要调整下。

@xiaohuoni
Copy link
Member Author

@sorrycc 要不你直接改了吧,这个关闭了,我这里没有window电脑。或者我晚上回去处理

@sorrycc
Copy link
Member

sorrycc commented Oct 30, 2018

好的,我来改用例。

@sorrycc sorrycc merged commit 6cae329 into master Oct 31, 2018
@sorrycc sorrycc deleted the win-dynamicRoot branch October 31, 2018 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants