Skip to content

Build your personal knowledge base with Trilium Notes

avoid extra call to find clipper inbox when clipping to existing note

contributord3712a19183d
diff --git a/apps/server/src/routes/api/clipper.ts b/apps/server/src/routes/api/clipper.ts
index 5526b37964..dad0365e6e 100644
--- a/apps/server/src/routes/api/clipper.ts
+++ b/apps/server/src/routes/api/clipper.ts
@@ -19,12 +19,11 @@ async function addClipping(req: Request) {
const { title, content, images } = req.body;
const clipType = "clippings";
- const clipperInbox = await getClipperInboxNote();
-
const pageUrl = sanitize.sanitizeUrl(req.body.pageUrl);
let clippingNote = findClippingNote(pageUrl, clipType);
if (!clippingNote) {
+ const clipperInbox = await getClipperInboxNote();
clippingNote = noteService.createNewNote({
parentNoteId: clipperInbox.noteId,
title,