Index: pkg/dev_compiler/lib/src/compiler/js_typeref_codegen.dart |
diff --git a/pkg/dev_compiler/lib/src/compiler/js_typeref_codegen.dart b/pkg/dev_compiler/lib/src/compiler/js_typeref_codegen.dart |
index 28bb62697f891131c661f9ce32f210817f4a1133..d8b8902e63990c5d4dcedb3639a4e0e1f1e2ca41 100644 |
--- a/pkg/dev_compiler/lib/src/compiler/js_typeref_codegen.dart |
+++ b/pkg/dev_compiler/lib/src/compiler/js_typeref_codegen.dart |
@@ -25,8 +25,10 @@ abstract class JsTypeRefCodegen { |
/// Finds the qualified path to the type. |
JS.TypeRef _emitTopLevelTypeRef(DartType type) { |
var e = type.element; |
- return new JS.TypeRef.qualified( |
- [emitLibraryName(e.library), new JS.Identifier(getJSExportName(e))]); |
+ return new JS.TypeRef.qualified([ |
+ emitLibraryName(e.library), |
+ new JS.Identifier(getJSExportName(e) ?? e.name) |
+ ]); |
} |
JS.TypeRef emitTypeRef(DartType type) { |