Skip to content

Commit

Permalink
Disallow the empty string from being selected by find
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Sep 10, 2018
1 parent b2ba281 commit 80e3bde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/addons/search/SearchHelper.ts
Expand Up @@ -119,7 +119,7 @@ export class SearchHelper implements ISearchHelper {
if (searchOptions.regex) {
const searchRegex = RegExp(lowerTerm, 'g');
const foundTerm = searchRegex.exec(lowerStringLine);
if (foundTerm) {
if (foundTerm && foundTerm[0].length > 0) {
searchIndex = searchRegex.lastIndex - foundTerm[0].length;
term = foundTerm[0];
}
Expand Down

0 comments on commit 80e3bde

Please sign in to comment.