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