File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
modules/angular2/src/util Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ export function makeDecorator(annotationCls) {
99 if ( ! ( Reflect && Reflect . getMetadata ) ) {
1010 throw 'reflect-metadata shim is required when using class decorators' ;
1111 }
12- var annotationInstance = Object . create ( annotationCls ) ;
13- annotationCls . call ( annotationInstance , args ) ;
12+ var annotationInstance = Object . create ( annotationCls . prototype ) ;
13+ annotationCls . apply ( annotationInstance , args ) ;
1414 return function ( cls ) {
1515 var annotations = Reflect . getMetadata ( 'annotations' , cls ) ;
1616 annotations = annotations || [ ] ;
@@ -28,8 +28,8 @@ export function makeParamDecorator(annotationCls) {
2828 if ( ! ( Reflect && Reflect . getMetadata ) ) {
2929 throw 'reflect-metadata shim is required when using parameter decorators' ;
3030 }
31- var annotationInstance = Object . create ( annotationCls ) ;
32- annotationCls . call ( annotationInstance , args ) ;
31+ var annotationInstance = Object . create ( annotationCls . prototype ) ;
32+ annotationCls . apply ( annotationInstance , args ) ;
3333 return function ( cls , unusedKey , index ) {
3434 var parameters = Reflect . getMetadata ( 'parameters' , cls ) ;
3535 parameters = parameters || [ ] ;
You can’t perform that action at this time.
0 commit comments