1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-13 22:12:50 +02:00

Desktop: Fixes #3093: Prevent Goto Anything from freezing when inputting special characters

This commit is contained in:
Laurent Cozic
2020-04-20 18:01:28 +00:00
parent c65ee4a424
commit e7169cc70d

View File

@@ -249,7 +249,7 @@ class Dialog extends React.PureComponent {
const mergedIndices = mergeOverlappingIntervals(indices, 3);
fragments = mergedIndices.map(f => body.slice(f[0], f[1])).join(' ... ');
// Add trailing ellipsis if the final fragment doesn't end where the note is ending
if (mergedIndices[mergedIndices.length - 1][1] !== body.length) fragments += ' ...';
if (mergedIndices.length && mergedIndices[mergedIndices.length - 1][1] !== body.length) fragments += ' ...';
}
results[i] = Object.assign({}, row, { path, fragments });