mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
fix(site): fix ie location origin
This commit is contained in:
parent
62eecdd935
commit
01d7bc45ac
@ -27,6 +27,13 @@
|
||||
desc: '{{item.meta.chinese}}'
|
||||
});
|
||||
{%- endfor %}
|
||||
// fix ie location origin
|
||||
// http://stackoverflow.com/questions/22564167/window-location-origin-gives-wrong-value-when-using-ie
|
||||
if (!window.location.origin) {
|
||||
window.location.origin = window.location.protocol + "//"
|
||||
+ window.location.hostname
|
||||
+ (window.location.port ? ':' + window.location.port : '');
|
||||
}
|
||||
var i = location.pathname.split('/').lastIndexOf('ant-design');
|
||||
if (i > 0) {
|
||||
window.rootUrl = location.origin + location.pathname.split('/').slice(0, 2+1).join('/');
|
||||
|
Loading…
Reference in New Issue
Block a user