Permalink
Browse files

fixed valid options loop

  • Loading branch information...
1 parent 484a7a3 commit 0a52d8bc78aca3e45ef824d9f0b2d139dfe6505b @marcelduran committed Nov 13, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/mapping.js
View
@@ -462,6 +462,9 @@ function setOptions(command, query) {
count = Object.keys(query).length;
[options.common].concat(command.options).some(function someTypes(options) {
+ if (!options) {
+ return;
+ }
Object.keys(options).some(function someOptions(key) {
if (query.hasOwnProperty(key)) {
opts[options[key].name] = options[key].bool ? !reBool.test(query[key]) :

0 comments on commit 0a52d8b

Please sign in to comment.