always use template strings instead of string concatenation

This commit is contained in:
zadam
2022-12-21 15:19:05 +01:00
parent ea006993f6
commit 1b24276a4a
154 changed files with 433 additions and 437 deletions

View File

@@ -68,7 +68,7 @@ function addClipping(req) {
const existingContent = clippingNote.getContent();
clippingNote.setContent(existingContent + (existingContent.trim() ? "<br/>" : "") + rewrittenContent);
clippingNote.setContent(`${existingContent}${existingContent.trim() ? "<br/>" : ""}${rewrittenContent}`);
return {
noteId: clippingNote.noteId
@@ -79,7 +79,7 @@ function createNote(req) {
let {title, content, pageUrl, images, clipType} = req.body;
if (!title || !title.trim()) {
title = "Clipped note from " + pageUrl;
title = `Clipped note from ${pageUrl}`;
}
const clipperInbox = getClipperInboxNote();
@@ -123,7 +123,7 @@ function processContent(images, note, content) {
? dataUrl.substr(0, Math.min(100, dataUrl.length))
: "null";
log.info("Image could not be recognized as data URL: " + excerpt);
log.info(`Image could not be recognized as data URL: ${excerpt}`);
continue;
}