| Index: pkg/analysis_server/lib/src/computer/computer_navigation.dart
|
| diff --git a/pkg/analysis_server/lib/src/computer/computer_navigation.dart b/pkg/analysis_server/lib/src/computer/computer_navigation.dart
|
| index ab0d8547f53b5cb462b1c4da2deb29dcb1c06b02..0c14dd699aa22a0cd36e5b8e3fa7b47a377d3e36 100644
|
| --- a/pkg/analysis_server/lib/src/computer/computer_navigation.dart
|
| +++ b/pkg/analysis_server/lib/src/computer/computer_navigation.dart
|
| @@ -44,6 +44,11 @@ class DartUnitNavigationComputer {
|
| return;
|
| }
|
| int targetIndex = _addTarget(element);
|
| + // TODO(scheglov) Fix the enclosing element problem in the incremental
|
| + // resolver and remove this.
|
| + if (targetIndex == null) {
|
| + return;
|
| + }
|
| regions.add(
|
| new protocol.NavigationRegion(offset, length, <int>[targetIndex]));
|
| }
|
| @@ -54,6 +59,11 @@ class DartUnitNavigationComputer {
|
| index = targets.length;
|
| protocol.NavigationTarget target =
|
| protocol.newNavigationTarget_fromElement(element, _addFile);
|
| + // TODO(scheglov) Fix the enclosing element problem in the incremental
|
| + // resolver and remove this.
|
| + if (target == null) {
|
| + return null;
|
| + }
|
| targets.add(target);
|
| targetMap[element] = index;
|
| }
|
|
|