fix: Extension admin page erroring out (#3054)

Extension admin pages are currently not working because of a JS error.
The settings record is never defined but directly used, it used to be defined as an empty object in oninit.
This commit is contained in:
Sami Mazouz 2021-08-25 18:33:19 +01:00 committed by GitHub
parent d2fed4989f
commit 91b5bf6a41

View File

@ -106,7 +106,7 @@ export type SettingsComponentOptions = HTMLInputSettingsComponentOptions | Switc
export type AdminHeaderAttrs = AdminHeaderOptions & Partial<Omit<Mithril.Attributes, 'class'>>;
export default abstract class AdminPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends Page<CustomAttrs> {
settings!: Record<string, Stream<string>>;
settings: Record<string, Stream<string>> = {};
loading: boolean = false;
view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {