fix recent changes showing deleted search note, closes #1331

This commit is contained in:
zadam
2020-10-26 19:58:56 +01:00
parent c671b0a345
commit 8901c3ec91
2 changed files with 4 additions and 3 deletions

View File

@@ -191,8 +191,8 @@ class TreeCache {
if (note.type === 'search') {
const searchResultNoteIds = await server.get('search-note/' + note.noteId);
if (!searchResultNoteIds) {
throw new Error(`Search note ${note.noteId} failed.`);
if (!Array.isArray(searchResultNoteIds)) {
throw new Error(`Search note ${note.noteId} failed: ${searchResultNoteIds}`);
}
// force to load all the notes at once instead of one by one