File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
packages/angular_devkit/build_optimizer Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 14
14
"dependencies" : {
15
15
"loader-utils" : " ^1.1.0" ,
16
16
"source-map" : " ^0.5.6" ,
17
- "typescript" : " ~2.6 .2" ,
18
- "webpack-sources" : " ^1.0.1 "
17
+ "typescript" : " ~2.7 .2" ,
18
+ "webpack-sources" : " ^1.1.0 "
19
19
}
20
20
}
Original file line number Diff line number Diff line change @@ -162,15 +162,14 @@ function findClassStaticPropertyAssignments(
162
162
}
163
163
164
164
const decls = symbol . declarations ;
165
- if ( decls === undefined || decls . length !== 1 ) {
165
+ if ( decls == undefined || decls . length === 0 ) {
166
166
return ;
167
167
}
168
- const classIdx = classes
169
- . map ( ( clazz ) => clazz . class ) . indexOf ( decls [ 0 ] as ts . VariableDeclaration ) ;
170
- if ( classIdx === - 1 ) {
168
+
169
+ const hostClass = classes . find ( ( clazz => decls . includes ( clazz . class ) ) ) ;
170
+ if ( ! hostClass ) {
171
171
return ;
172
172
}
173
- const hostClass = classes [ classIdx ] ;
174
173
const statement : StatementData = { expressionStatement, hostClass } ;
175
174
176
175
hostClass . statements . push ( statement ) ;
You can’t perform that action at this time.
0 commit comments