docs: Redirect when location match next.ant.design

This commit is contained in:
zombiej 2020-02-29 00:03:19 +08:00
parent ed4270b506
commit 34c64e443a

View File

@ -26,7 +26,7 @@ if (typeof window !== 'undefined' && navigator.serviceWorker) {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
// Redirect to `ant.design` if is not next version anymore // Redirect to `ant.design` if is not next version anymore
if (antdReproduceVersion === 'latest' && location.hostname === 'next.ant.design') { if (location.hostname === 'next.ant.design') {
location.href = location.href.replace('next.ant.design', 'ant.design'); location.href = location.href.replace('next.ant.design', 'ant.design');
} }