Skip to content

Commit 91907f7

Browse files
committed
Fix search query
1 parent 3bf6afb commit 91907f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SQLScriptsExplorer.Addin/Repository/TreeNodeRepository.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ private List<TreeNode> CreateTree(List<TreeNode> lstTreeNode, Dictionary<string,
109109
public List<TreeNode> Search(string keyword)
110110
{
111111
// Use current search Tree to perform further searches
112-
if (previousSearchKeyword.StartsWith(keyword))
112+
if (!string.IsNullOrWhiteSpace(keyword) && !string.IsNullOrWhiteSpace(previousSearchKeyword) &&
113+
keyword.StartsWith(previousSearchKeyword))
113114
{
114115
TreeSearchResult = TreeSearchResult.Clone();
115116
}

0 commit comments

Comments
 (0)