From c2a0cf8d0477ca16a7ef6c5a8c96d9e76319dfdc Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Wed, 25 Aug 2021 18:33:19 +0100 Subject: [PATCH] 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. --- js/src/admin/components/AdminPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/admin/components/AdminPage.tsx b/js/src/admin/components/AdminPage.tsx index b83d23a7b..7c368999b 100644 --- a/js/src/admin/components/AdminPage.tsx +++ b/js/src/admin/components/AdminPage.tsx @@ -106,7 +106,7 @@ export type SettingsComponentOptions = HTMLInputSettingsComponentOptions | Switc export type AdminHeaderAttrs = AdminHeaderOptions & Partial>; export default abstract class AdminPage extends Page { - settings!: Record>; + settings: Record> = {}; loading: boolean = false; view(vnode: Mithril.Vnode): Mithril.Children {