remove render404

This commit is contained in:
Paul Sealock 2019-07-03 11:38:11 +12:00
parent dbd8793c05
commit 3068013095
1 changed files with 0 additions and 9 deletions

View File

@ -104,20 +104,11 @@ export class Controller extends Component {
return query;
}
// @todo What should we display or do when a route/page doesn't exist?
render404() {
return null;
}
render() {
const { page, match, location } = this.props;
const { url, params } = match;
const query = this.getBaseQuery( location.search );
if ( ! page ) {
return this.render404();
}
window.wpNavMenuUrlUpdate( page, query );
window.wpNavMenuClassChange( page, url );
return createElement( page.container, { params, path: url, pathMatch: page.path, query } );