Skip to content

Commit 46d8deb

Browse files
committed
fix error on no config provided
1 parent c6cb588 commit 46d8deb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ const typeTemplateMap: { [key: string]: string } = {
2424
};
2525

2626
export class ConfigClass {
27-
file: { config: ConfigDefinition };
27+
file: { config?: ConfigDefinition };
2828
widgets: Array<WidgetDefinition> = [];
2929

3030
constructor(config_object: object) {
3131
this.file = config_object as { config: ConfigDefinition };
32-
this.widgets = this.file.config.widgets;
32+
this.widgets = this.file.config?.widgets || [];
3333
}
3434

3535
public get_widgets_html() {

0 commit comments

Comments
 (0)