Unbreak RN JS server for Android.

This commit is contained in:
Hedger Wang 2015-05-20 18:38:55 -07:00
Родитель 08844e3ddc
Коммит b46c94aaf9
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -52,6 +52,15 @@ function parseCommandLine(config) {
if (argv[command] === 'false') {
argv[command] = false;
}
if (config[i].type === 'string') {
// According to https://github.com/substack/node-optimist#numbers,
// every argument that looks like a number should be converted to one.
var strValue = argv[command];
var numValue = strValue ? Number(strValue) : undefined;
if (typeof numValue === 'number' && !isNaN(numValue)) {
argv[command] = numValue;
}
}
}
// Show --help