Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #623 from jiangzhuo/patch-1
Browse files Browse the repository at this point in the history
fix bug on arg parse, change parseInt to Number()
  • Loading branch information
cynron committed Sep 30, 2014
2 parents 2fbd801 + 917a1d1 commit c4f4be8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/util/appUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ var parseArgs = function(args) {
var sep = arg.indexOf('=');
var key = arg.slice(0, sep);
var value = arg.slice(sep + 1);
if (!isNaN(parseInt(value, 10)) && (value.indexOf('.') < 0)) {
value = parseInt(value, 10);
if (!isNaN(Number(value)) && (value.indexOf('.') < 0)) {
value = Number(value);
}
argsMap[key] = value;
}
Expand Down

0 comments on commit c4f4be8

Please sign in to comment.