Skip to content

Commit f575ba6

Browse files
jakemac53tbosch
authored andcommitted
fix(transformer): Don't throw on annotations that don't match a descriptor.
Closes angular#3280
1 parent 5b5de66 commit f575ba6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/angular2/src/transform/common/annotation_matcher.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ class AnnotationMatcher extends ClassMatcherBase {
8484
bool _implementsWithWarning(Annotation annotation, AssetId assetId,
8585
List<ClassDescriptor> interfaces) {
8686
ClassDescriptor descriptor = firstMatch(annotation.name, assetId);
87-
if (descriptor == null) {
88-
throw 'Unable to locate descriptor for ${annotation.name} in ${assetId}';
89-
}
87+
if (descriptor == null) return false;
9088
return implements(descriptor, interfaces,
9189
missingSuperClassWarning: 'Missing `custom_annotation` entry for `${descriptor.superClass}`.');
9290
}

0 commit comments

Comments
 (0)