Skip to content

Commit f62378f

Browse files
committed
fix #69
1 parent bbd0593 commit f62378f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/prompt.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,9 +761,14 @@ function convert(schema) {
761761
}
762762

763763
if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
764-
schema.description = schema.message;
765-
schema.message = schema.warning;
766-
764+
if(typeof schema.message !== 'undefined'){
765+
schema.description = schema.message;
766+
}
767+
768+
if(typeof schema.warning !== 'undefined'){
769+
schema.message = schema.warning;
770+
}
771+
767772
if (typeof schema.validator === 'function') {
768773
schema.conform = schema.validator;
769774
} else {

0 commit comments

Comments
 (0)