Index: sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
index a4a2a63d36f3eafc43640e6c9c0bce2a7aca26b6..a5e414cc50d6384b55992239582214a64ab15883 100644 |
--- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
+++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
@@ -895,6 +895,9 @@ class Dartdoc { |
listTypes(types, header) { |
if (types == null) return; |
+ // Filter out injected types. (JavaScriptIndexingBehavior) |
+ types = new List.from(types.filter((t) => t.library != null)); |
+ |
var publicTypes; |
if (showPrivate) { |
publicTypes = types; |
@@ -1538,7 +1541,9 @@ class Dartdoc { |
if (type is LibraryMirror) { |
return '${sanitize(type.simpleName)}.html'; |
} |
- assert (type is TypeMirror); |
+ if (type.library == null) { |
+ return ''; |
+ } |
// Always get the generic type to strip off any type parameters or |
// arguments. If the type isn't generic, genericType returns `this`, so it |
// works for non-generic types too. |