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 2b4dd3dcca17c7aa70a3581fcb20510822cf92a8..fb116a165a13058fdeddb93d062690f32a16104a 100644 |
--- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
+++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
@@ -894,6 +894,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; |
@@ -1537,7 +1540,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. |