Skip to content

Build your personal knowledge base with Trilium Notes

client: Fix double errors if not returning a widget

Elian Doran03a23d15f9a5
diff --git a/src/public/app/services/bundle.js b/src/public/app/services/bundle.js
index 279d2d560d..e0a81eee47 100644
--- a/src/public/app/services/bundle.js
+++ b/src/public/app/services/bundle.js
@@ -76,10 +76,11 @@ async function getWidgetBundlesByParent() {
try {
widget = await executeBundle(bundle);
- widget._noteId = bundle.noteId;
- widgetsByParent.add(widget);
- }
- catch (e) {
+ if (widget) {
+ widget._noteId = bundle.noteId;
+ widgetsByParent.add(widget);
+ }
+ } catch (e) {
const noteId = bundle.noteId;
const note = await froca.getNote(noteId);
toastService.showPersistent({