Skip to content

Commit

Permalink
fix(validator): Fix validation error for LIST
Browse files Browse the repository at this point in the history
Fix validation error for LIST flag when an option without value is passed
  • Loading branch information
mattallty committed May 8, 2019
1 parent d3926dd commit 1669d5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class Validator {

if (typeof value === 'string') {
value = value.split(',');
} else if (!Array.isArray(value)) {
value = []
}

return value.map(function (el) {
Expand Down

0 comments on commit 1669d5f

Please sign in to comment.