We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b1ee38 commit 154632cCopy full SHA for 154632c
lib/src/model.dart
@@ -2096,7 +2096,8 @@ abstract class ModelElement extends Nameable
2096
if (md == null) md = new List<dynamic>();
2097
return md.map((dynamic a) {
2098
String annotation = (const HtmlEscape()).convert(a.toSource());
2099
- var me = package.findCanonicalModelElementFor(a.element.enclosingElement);
+ // a.element can be null if the element can't be resolved.
2100
+ var me = package.findCanonicalModelElementFor(a.element?.enclosingElement);
2101
if (me != null)
2102
annotation = annotation.replaceFirst(me.name, me.linkedName);
2103
return annotation;
0 commit comments