remove render404
This commit is contained in:
parent
dbd8793c05
commit
3068013095
|
@ -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 } );
|
||||
|
|
Loading…
Reference in New Issue