mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 04:33:47 +08:00
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:
parent
d2fed4989f
commit
91b5bf6a41
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user