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 704dc32 commit 39c22c5Copy full SHA for 39c22c5
lib/src/model.dart
@@ -2332,7 +2332,8 @@ abstract class ModelElement extends Nameable
2332
if (md == null) md = new List<dynamic>();
2333
return md.map((dynamic a) {
2334
String annotation = (const HtmlEscape()).convert(a.toSource());
2335
- var me = package.findCanonicalModelElementFor(a.element.enclosingElement);
+ // a.element can be null if the element can't be resolved.
2336
+ var me = package.findCanonicalModelElementFor(a.element?.enclosingElement);
2337
if (me != null)
2338
annotation = annotation.replaceFirst(me.name, me.linkedName);
2339
return annotation;
0 commit comments