Navigate to dashboard page if extension ID not found (#2584)

This commit is contained in:
David Sevilla Martín 2021-01-30 17:45:20 -05:00 committed by GitHub
parent fea657e35b
commit cf85181e3e

View File

@ -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()}