Skip to content

Commit

Permalink
fix #69
Browse files Browse the repository at this point in the history
  • Loading branch information
lgg committed Jun 2, 2016
1 parent bbd0593 commit f62378f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,14 @@ function convert(schema) {
}

if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
schema.description = schema.message;
schema.message = schema.warning;

if(typeof schema.message !== 'undefined'){
schema.description = schema.message;
}

if(typeof schema.warning !== 'undefined'){
schema.message = schema.warning;
}

if (typeof schema.validator === 'function') {
schema.conform = schema.validator;
} else {
Expand Down

0 comments on commit f62378f

Please sign in to comment.