Skip to content

Commit

Permalink
benchmark: allow empty parameters
Browse files Browse the repository at this point in the history
PR-URL: #5123
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
mscdex authored and rvagg committed Feb 10, 2016
1 parent 8301773 commit 8d713d8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ function parseOpts(options) {
var num = keys.length;
var conf = {};
for (var i = 2; i < process.argv.length; i++) {
var match = process.argv[i].match(/^(.+)=(.+)$/);
if (!match || !match[1] || !match[2] || !options[match[1]]) {
var match = process.argv[i].match(/^(.+)=(.*)$/);
if (!match || !match[1] || !options[match[1]]) {
return null;
} else {
conf[match[1]] = isFinite(match[2]) ? +match[2] : match[2]
conf[match[1]] = (match[2].length && isFinite(match[2])
? +match[2]
: match[2]);
num--;
}
}
Expand Down

0 comments on commit 8d713d8

Please sign in to comment.