Merge branch 'master' into next

This commit is contained in:
zadam
2021-04-29 22:09:48 +02:00
5 changed files with 31 additions and 23 deletions

View File

@@ -122,11 +122,12 @@ function BackendScriptApi(currentNote, apiParams) {
* "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
*
* @method
* @param {string} searchString
* @param {string} query
* @param {Object} [searchParams]
* @returns {Note|null}
*/
this.searchForNote = searchString => {
const notes = searchService.searchNoteEntities(searchString);
this.searchForNote = (query, searchParams = {}) => {
const notes = this.searchForNotes(query, searchParams);
return notes.length > 0 ? notes[0] : null;
};