mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fallback for missing parsed title, closes trilium-web-clipper/issues/16
This commit is contained in:
parent
1b0a2b41da
commit
3219441fdf
@ -65,7 +65,11 @@ async function addClipping(req) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function createNote(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}`);
|
log.info(`Creating clipped note from ${pageUrl}`);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user