File tree 2 files changed +8
-11
lines changed
packages/angular/cli/utilities
tests/legacy-cli/e2e/tests/generate
2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -151,26 +151,23 @@ export async function parseJsonSchemaToOptions(
151
151
}
152
152
153
153
let defaultValue : string | number | boolean | undefined = undefined ;
154
- if ( schema . default !== undefined ) {
154
+ if ( current . default !== undefined ) {
155
155
switch ( types [ 0 ] ) {
156
156
case 'string' :
157
- if ( typeof schema . default == 'string' ) {
158
- defaultValue = schema . default ;
157
+ if ( typeof current . default == 'string' ) {
158
+ defaultValue = current . default ;
159
159
}
160
160
break ;
161
161
case 'number' :
162
- if ( typeof schema . default == 'number' ) {
163
- defaultValue = schema . default ;
162
+ if ( typeof current . default == 'number' ) {
163
+ defaultValue = current . default ;
164
164
}
165
165
break ;
166
166
case 'boolean' :
167
- if ( typeof schema . default == 'boolean' ) {
168
- defaultValue = schema . default ;
167
+ if ( typeof current . default == 'boolean' ) {
168
+ defaultValue = current . default ;
169
169
}
170
170
break ;
171
-
172
- default :
173
- console . log ( types [ 0 ] , schema ) ;
174
171
}
175
172
}
176
173
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export default function() {
88
88
. then ( ( ) => ng ( 'generate' , 'fake' , '--help' ) )
89
89
// verify same output
90
90
. then ( ( { stdout} ) => {
91
- if ( ! / n g g e n e r a t e f a k e - s c h e m a t i c s : f a k e < a > < b > \[ o p t i o n s \] / . test ( stdout ) ) {
91
+ if ( ! / n g g e n e r a t e f a k e < a > < b > \[ o p t i o n s \] / . test ( stdout ) ) {
92
92
throw new Error ( 'Help signature is wrong (2).' ) ;
93
93
}
94
94
if ( ! / o p t - a [ \s \S ] * o p t - b [ \s \S ] * o p t - c / . test ( stdout ) ) {
You can’t perform that action at this time.
0 commit comments