Skip to content

Build your personal knowledge base with Trilium Notes

Merge remote-tracking branch 'origin/stable'

zadamf028b88ccecc
diff --cc src/routes/api/clipper.js
index a2002dfe8f,f6917f00d0..b0d8e1df2b
--- a/src/routes/api/clipper.js
+++ b/src/routes/api/clipper.js
@@@ -64,14 -64,18 +64,15 @@@ function addClipping(req)
};
}
-async function createNote(req) {
+function createNote(req) {
- const {title, content, pageUrl, images, clipType} = req.body;
-
- log.info(`Creating clipped note from ${pageUrl}`);
+ let {title, content, pageUrl, images, clipType} = req.body;
+ if (!title || !title.trim()) {
+ title = "Clipped note from " + pageUrl;
+ }
+ const clipperInbox = getClipperInboxNote();
- log.info(`Creating clipped note from ${pageUrl}`);
-
- const clipperInbox = await getClipperInboxNote();
-
- const {note} = await noteService.createNewNote({
+ const {note} = noteService.createNewNote({
parentNoteId: clipperInbox.noteId,
title,
content,