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

@@ -228,16 +228,20 @@ function checkHiddenSubtree() {
function checkHiddenSubtreeRecursively(parentNoteId, item) {
if (!item.id || !item.type || !item.title) {
throw new Error(`Item does not contain mandatory properties: ` + JSON.stringify(item));
throw new Error(`Item does not contain mandatory properties: ${JSON.stringify(item)}`);
}
// if (item.id.charAt(0) !== '_') {
// throw new Error("ID has to start with underscore");
// }
let note = becca.notes[item.id];
let branch = becca.branches[item.id];
const attrs = [...(item.attributes || [])];
if (item.icon) {
attrs.push({ type: 'label', name: 'iconClass', value: 'bx ' + item.icon });
attrs.push({ type: 'label', name: 'iconClass', value: `bx ${item.icon}` });
}
if (!note) {