Skip to content

Commit

Permalink
Property description + type = invalid input. Fixes #64
Browse files Browse the repository at this point in the history
  • Loading branch information
vhpoet committed Oct 20, 2013
1 parent d20046f commit 36a6075
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/prompt.js
Expand Up @@ -450,8 +450,8 @@ prompt.getInput = function (prop, callback) {
delete prompt.override[propName];
}

var type = (schema.properties && schema.properties[name] &&
schema.properties[name].type || '').toLowerCase().trim(),
var type = (schema.properties && schema.properties[propName] &&
schema.properties[propName].type || '').toLowerCase().trim(),
wait = type === 'array';

if (type === 'array') {
Expand Down Expand Up @@ -516,8 +516,8 @@ prompt.getInput = function (prop, callback) {

if (line !== '') {

if (schema.properties[name]) {
var type = (schema.properties[name].type || '').toLowerCase().trim() || undefined;
if (schema.properties[propName]) {
var type = (schema.properties[propName].type || '').toLowerCase().trim() || undefined;

//
// Attempt to parse input as a float if the schema expects a number.
Expand Down

0 comments on commit 36a6075

Please sign in to comment.