Index: pkg/analysis_server/lib/src/search/search_domain.dart |
diff --git a/pkg/analysis_server/lib/src/search/search_domain.dart b/pkg/analysis_server/lib/src/search/search_domain.dart |
index 37c58a69e5811e06cf039dafa67807aa5422178c..cdd39a3ca7ef3cee19364199198b93e2cae07941 100644 |
--- a/pkg/analysis_server/lib/src/search/search_domain.dart |
+++ b/pkg/analysis_server/lib/src/search/search_domain.dart |
@@ -98,6 +98,7 @@ class SearchDomainHandler implements protocol.RequestHandler { |
// search |
List<SearchMatch> matches = |
await searchEngine.searchMemberDeclarations(params.name); |
+ matches = SearchMatch.withNotNullElement(matches); |
_sendSearchNotification(searchId, true, matches.map(toResult)); |
} |
@@ -112,6 +113,7 @@ class SearchDomainHandler implements protocol.RequestHandler { |
// search |
List<SearchMatch> matches = |
await searchEngine.searchMemberReferences(params.name); |
+ matches = SearchMatch.withNotNullElement(matches); |
_sendSearchNotification(searchId, true, matches.map(toResult)); |
} |
@@ -135,6 +137,7 @@ class SearchDomainHandler implements protocol.RequestHandler { |
// search |
List<SearchMatch> matches = |
await searchEngine.searchTopLevelDeclarations(params.pattern); |
+ matches = SearchMatch.withNotNullElement(matches); |
_sendSearchNotification(searchId, true, matches.map(toResult)); |
} |