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