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

@@ -38,7 +38,8 @@ async function searchFromNote(req) {
}
if (note.isDeleted) {
return [400, `Note ${req.params.noteId} is deleted.`];
// this can be triggered from recent changes and it's harmless to return empty list rather than fail
return [];
}
if (note.type !== 'search') {