mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 16:25:51 +01:00
always use template strings instead of string concatenation
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user