mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-19 06:43:16 +08:00
fix 404 redirect
This commit is contained in:
parent
45c98fdad2
commit
4f44b32ffa
4
404.html
4
404.html
@ -1,8 +1,8 @@
|
||||
<script>
|
||||
var prefix = /^\/components/.test(location.pathname) ? location.pathname.replace(/^\//, '').split('/').join('-') : '';
|
||||
if (location.pathname === '/changelog') {
|
||||
location.href = '/#/docs/react/' + location.pathname.replace(/\/?#/, '?scrollTo=' + prefix);
|
||||
location.href = '/#/docs/react/changelog?scrollTo=' + location.hash;
|
||||
} else {
|
||||
location.href = '/#' + location.pathname.replace(/\/?#/, '?scrollTo=' + prefix);
|
||||
location.href = '/#' + location.pathname + '?scrollTo=' + prefix + location.hash;
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user