recent notes doesn't fail totally when we can't find title for some note

This commit is contained in:
azivner
2018-02-11 15:33:10 -05:00
parent 438f7c5b0b
commit f9f8ecb2b1
2 changed files with 12 additions and 2 deletions

View File

@@ -40,7 +40,16 @@ const recentNotes = (function() {
$searchInput.autocomplete({
source: recNotes.map(notePath => {
const noteTitle = noteTree.getNotePathTitle(notePath);
let noteTitle;
try {
noteTitle = noteTree.getNotePathTitle(notePath);
}
catch (e) {
noteTitle = "[error - can't find note title]";
messaging.logError("Could not find title for notePath=" + notePath + ", stack=" + e.stack);
}
return {
label: noteTitle,