mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
site: fix 404, close: #3098
This commit is contained in:
parent
602000f1a1
commit
e521009670
@ -11,6 +11,11 @@ const locale = isZhCN ? 'zh-CN' : 'en-US';
|
||||
export function collect(nextProps, callback) {
|
||||
const pageData = nextProps.location.pathname === 'changelog' ?
|
||||
nextProps.data.CHANGELOG : nextProps.pageData;
|
||||
if (!pageData) {
|
||||
callback(404, nextProps);
|
||||
return;
|
||||
}
|
||||
|
||||
const pageDataPromise = typeof pageData === 'function' ?
|
||||
pageData() : (pageData[locale] || pageData.index[locale] || pageData.index)();
|
||||
const promises = [pageDataPromise];
|
||||
|
Loading…
Reference in New Issue
Block a user