mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 02:42:44 +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
1b77df12b6
commit
c2a0cf8d04
|
@ -106,7 +106,7 @@ export type SettingsComponentOptions = HTMLInputSettingsComponentOptions | Switc
|
||||||
export type AdminHeaderAttrs = AdminHeaderOptions & Partial<Omit<Mithril.Attributes, 'class'>>;
|
export type AdminHeaderAttrs = AdminHeaderOptions & Partial<Omit<Mithril.Attributes, 'class'>>;
|
||||||
|
|
||||||
export default abstract class AdminPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends Page<CustomAttrs> {
|
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;
|
loading: boolean = false;
|
||||||
|
|
||||||
view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {
|
view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user