Browse Source

fix 404 redirect

pull/1641/head
afc163 9 years ago
parent
commit
4f44b32ffa
  1. 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…
Cancel
Save