refactor(Compiler): misc cleanup

This commit is contained in:
Victor Berchet
2017-01-04 13:59:43 -08:00
committed by Matias Niemelä
parent d43e5dd44d
commit 83d0ff6d13
34 changed files with 69 additions and 98 deletions

View File

@ -9,7 +9,7 @@
import {Pipe, Type, resolveForwardRef} from '@angular/core';
import {ListWrapper} from './facade/collection';
import {isPresent, stringify} from './facade/lang';
import {stringify} from './facade/lang';
import {CompilerInjectable} from './injectable';
import {ReflectorReader, reflector} from './private_import_core';
@ -38,9 +38,9 @@ export class PipeResolver {
*/
resolve(type: Type<any>, throwIfNotFound = true): Pipe {
const metas = this._reflector.annotations(resolveForwardRef(type));
if (isPresent(metas)) {
if (metas) {
const annotation = ListWrapper.findLast(metas, _isPipeMetadata);
if (isPresent(annotation)) {
if (annotation) {
return annotation;
}
}