From 87dcd5eb6f46011720aa4a4d41d7f00a26f05754 Mon Sep 17 00:00:00 2001 From: Rado Kirov Date: Thu, 30 Apr 2015 10:22:30 -0700 Subject: [PATCH] fix(decorators): updates missing benchmark and fixes typo. --- modules/angular2/src/core/decorators/decorators.es6 | 2 +- modules/benchmarks/src/tree/tree_benchmark.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/angular2/src/core/decorators/decorators.es6 b/modules/angular2/src/core/decorators/decorators.es6 index 175e68f2d8..ad341b0346 100644 --- a/modules/angular2/src/core/decorators/decorators.es6 +++ b/modules/angular2/src/core/decorators/decorators.es6 @@ -8,7 +8,7 @@ import {AttributeAnnotation, QueryAnnotation} from '../annotations/di'; function makeDecorator(annotationCls) { return function(...args) { - if (!(window.Reflect && !window.Reflect.getMetadata)) throw 'reflect-metadata shim is required'; + if (!(window.Reflect && window.Reflect.getMetadata)) throw 'reflect-metadata shim is required'; var annotationInstance = new annotationCls(...args); var Reflect = window.Reflect; return function(cls) { diff --git a/modules/benchmarks/src/tree/tree_benchmark.js b/modules/benchmarks/src/tree/tree_benchmark.js index c3a2f320a5..ed40e79f83 100644 --- a/modules/benchmarks/src/tree/tree_benchmark.js +++ b/modules/benchmarks/src/tree/tree_benchmark.js @@ -1,4 +1,9 @@ -import {bootstrap, Component, View, ViewContainerRef, Compiler, Decorator} from 'angular2/angular2'; +import {bootstrap, ViewContainerRef, Compiler} from 'angular2/angular2'; + +// TODO(radokirov): Once the application is transpiled by TS instead of Traceur, +// add those imports back into 'angular2/angular2'; +import {Component, Decorator} from 'angular2/src/core/annotations_impl/annotations'; +import {View} from 'angular2/src/core/annotations_impl/view'; import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle'; import {reflector} from 'angular2/src/reflection/reflection';