mirror of
https://github.com/zadam/trilium.git
synced 2024-09-21 16:16:04 +08:00
removed unnecessary async/awaits
This commit is contained in:
parent
ae1220b970
commit
109bead1c7
|
@ -456,7 +456,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||
const title = (branch.prefix ? (branch.prefix + " - ") : "") + note.title;
|
||||
const hoistedNoteId = hoistedNoteService.getHoistedNoteId();
|
||||
|
||||
const isFolder = await this.isFolder(note);
|
||||
const isFolder = this.isFolder(note);
|
||||
|
||||
const node = {
|
||||
noteId: note.noteId,
|
||||
|
@ -481,7 +481,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||
return node;
|
||||
}
|
||||
|
||||
async isFolder(note) {
|
||||
isFolder(note) {
|
||||
if (note.type === 'search') {
|
||||
return true;
|
||||
}
|
||||
|
@ -717,11 +717,11 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||
return this.getNodeFromPath(notePath, true, expandOpts);
|
||||
}
|
||||
|
||||
async updateNode(node) {
|
||||
updateNode(node) {
|
||||
const note = treeCache.getNoteFromCache(node.data.noteId);
|
||||
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.noteType = note.type;
|
||||
|
|
Loading…
Reference in a new issue