fixed script support

This commit is contained in:
zadam
2020-08-18 23:32:50 +02:00
parent 7335844ae3
commit 5741b380f0
3 changed files with 22 additions and 16 deletions

View File

@@ -176,11 +176,9 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
* @returns {Promise<NoteShort[]>}
*/
this.searchForNotes = async searchString => {
const noteIds = await this.runOnBackend(async searchString => {
const notes = await api.searchForNotes(searchString);
return notes.map(note => note.noteId);
}, [searchString]);
const noteIds = await this.runOnBackend(
searchString => api.searchForNotes(searchString).map(note => note.noteId),
[searchString]);
return await treeCache.getNotes(noteIds);
};