Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
getNoteWithLabel fix
azivnerfb54678fef94
diff --git a/src/services/labels.js b/src/services/labels.jsindex 896f61697f..cc8f74a50e 100644--- a/src/services/labels.js+++ b/src/services/labels.js@@ -39,7 +39,7 @@ async function getNotesWithLabel(name, value) {}async function getNoteWithLabel(name, value) {- const notes = getNotesWithLabel(name, value);+ const notes = await getNotesWithLabel(name, value);return notes.length > 0 ? notes[0] : null;}diff --git a/src/services/script_context.js b/src/services/script_context.jsindex 0236f8efea..9e31dd8116 100644--- a/src/services/script_context.js+++ b/src/services/script_context.js@@ -59,7 +59,7 @@ function ScriptApi(startNote, currentNote) {this.getRootCalendarNoteId = dateNoteService.getRootCalendarNoteId;this.getDateNoteId = dateNoteService.getDateNoteId;- this.transaction = sql.doInTransaction;+ this.transactional = sql.doInTransaction;}module.exports = ScriptContext;\ No newline at end of file