removed unnecessary async/awaits

This commit is contained in:
zadam 2020-05-04 10:19:11 +02:00
parent ae1220b970
commit 109bead1c7

View File

@ -456,7 +456,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
const title = (branch.prefix ? (branch.prefix + " - ") : "") + note.title; const title = (branch.prefix ? (branch.prefix + " - ") : "") + note.title;
const hoistedNoteId = hoistedNoteService.getHoistedNoteId(); const hoistedNoteId = hoistedNoteService.getHoistedNoteId();
const isFolder = await this.isFolder(note); const isFolder = this.isFolder(note);
const node = { const node = {
noteId: note.noteId, noteId: note.noteId,
@ -481,7 +481,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
return node; return node;
} }
async isFolder(note) { isFolder(note) {
if (note.type === 'search') { if (note.type === 'search') {
return true; return true;
} }
@ -717,11 +717,11 @@ export default class NoteTreeWidget extends TabAwareWidget {
return this.getNodeFromPath(notePath, true, expandOpts); return this.getNodeFromPath(notePath, true, expandOpts);
} }
async updateNode(node) { updateNode(node) {
const note = treeCache.getNoteFromCache(node.data.noteId); const note = treeCache.getNoteFromCache(node.data.noteId);
const branch = treeCache.getBranch(node.data.branchId); const branch = treeCache.getBranch(node.data.branchId);
const isFolder = await this.isFolder(note); const isFolder = this.isFolder(note);
node.data.isProtected = note.isProtected; node.data.isProtected = note.isProtected;
node.data.noteType = note.type; node.data.noteType = note.type;