mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
Desktop: Fixes #5417: Handle invalid search index in Goto Anything
This commit is contained in:
parent
c529b972e3
commit
71c470f59d
@ -337,6 +337,10 @@ class Dialog extends React.PureComponent<Props, State> {
|
||||
// @ts-ignore
|
||||
const notesById = notes.reduce((obj, { id, body, markup_language }) => ((obj[[id]] = { id, body, markup_language }), obj), {});
|
||||
|
||||
// Filter out search results that are associated with non-existing notes.
|
||||
// https://github.com/laurent22/joplin/issues/5417
|
||||
results = results.filter(r => !!notesById[r.id]);
|
||||
|
||||
for (let i = 0; i < results.length; i++) {
|
||||
const row = results[i];
|
||||
const path = Folder.folderPathString(this.props.folders, row.parent_id);
|
||||
|
Loading…
Reference in New Issue
Block a user