Skip to content

Commit 1f16d11

Browse files
committed
fix(@angular/cli): avoid using number inquirer prompt in schematic prompts
The number prompt type currently prevents correction of an invalid user entered value after schema validation. An input type is now used instead. Type coercion based on the schema type(s) already occurs during the filter phase for the inquirer question.
1 parent d62441f commit 1f16d11

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

packages/angular/cli/models/schematic-command.ts

-11
Original file line numberDiff line numberDiff line change
@@ -356,17 +356,6 @@ export abstract class SchematicCommand<
356356
};
357357
});
358358
break;
359-
case 'input':
360-
if (
361-
definition.propertyTypes.size === 1 &&
362-
(definition.propertyTypes.has('number') ||
363-
definition.propertyTypes.has('integer'))
364-
) {
365-
question.type = 'number';
366-
} else {
367-
question.type = 'input';
368-
}
369-
break;
370359
default:
371360
question.type = definition.type;
372361
break;

0 commit comments

Comments
 (0)