frontend validation of attribute name + other changes and fixes

This commit is contained in:
zadam
2020-08-17 23:54:18 +02:00
parent f24e27dadd
commit 3670fbff49
7 changed files with 71 additions and 50 deletions

View File

@@ -4,6 +4,7 @@ const noteCache = require('./note_cache');
const hoistedNoteService = require('../hoisted_note');
const protectedSessionService = require('../protected_session');
const stringSimilarity = require('string-similarity');
const log = require('../log');
function isNotePathArchived(notePath) {
const noteId = notePath[notePath.length - 1];
@@ -62,6 +63,11 @@ function getNoteTitle(childNoteId, parentNoteId) {
const childNote = noteCache.notes[childNoteId];
const parentNote = noteCache.notes[parentNoteId];
if (!childNote) {
log.info(`Cannot find note in cache for noteId ${childNoteId}`);
return "[error fetching title]";
}
let title;
if (childNote.isProtected) {