mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
Navigate to dashboard page if extension ID not found (#2584)
This commit is contained in:
parent
fea657e35b
commit
cf85181e3e
|
@ -32,6 +32,10 @@ export default class ExtensionPage extends Page {
|
|||
source: 'fas fa-code',
|
||||
};
|
||||
|
||||
if (!this.extension) {
|
||||
return m.route.set(app.route('dashboard'));
|
||||
}
|
||||
|
||||
// Backwards compatibility layer will be removed in
|
||||
// Beta 16
|
||||
if (app.extensionSettings[this.extension.id]) {
|
||||
|
@ -40,10 +44,14 @@ export default class ExtensionPage extends Page {
|
|||
}
|
||||
|
||||
className() {
|
||||
if (!this.extension) return '';
|
||||
|
||||
return this.extension.id + '-Page';
|
||||
}
|
||||
|
||||
view() {
|
||||
if (!this.extension) return null;
|
||||
|
||||
return (
|
||||
<div className={'ExtensionPage ' + this.className()}>
|
||||
{this.header()}
|
||||
|
|
Loading…
Reference in New Issue
Block a user