mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 22:05:44 +01:00
refactoring of access to options in frontend
This commit is contained in:
@@ -74,10 +74,13 @@ class Sidebar {
|
||||
|
||||
try {
|
||||
const widget = new widgetClass(this.ctx, state);
|
||||
await widget.renderBody();
|
||||
|
||||
this.widgets.push(widget);
|
||||
this.$widgetContainer.append(widget.getWidgetElement());
|
||||
if (await widget.isEnabled()) {
|
||||
const $el = await widget.render();
|
||||
|
||||
this.widgets.push(widget);
|
||||
this.$widgetContainer.append($el);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
messagingService.logError(`Error while loading widget ${widgetClass.name}: ${e.message}`);
|
||||
|
||||
Reference in New Issue
Block a user