diff --git a/src/routes/api/clipper.js b/src/routes/api/clipper.js index 6ad2efea4..f6917f00d 100644 --- a/src/routes/api/clipper.js +++ b/src/routes/api/clipper.js @@ -65,7 +65,11 @@ async function addClipping(req) { } async function createNote(req) { - const {title, content, pageUrl, images, clipType} = req.body; + let {title, content, pageUrl, images, clipType} = req.body; + + if (!title || !title.trim()) { + title = "Clipped note from " + pageUrl; + } log.info(`Creating clipped note from ${pageUrl}`); @@ -155,4 +159,4 @@ module.exports = { addClipping, openNote, handshake -}; \ No newline at end of file +};