mirror of https://github.com/status-im/metro.git
Unbreak RN JS server for Android.
This commit is contained in:
parent
2271166a83
commit
39af67ece3
|
@ -52,6 +52,15 @@ function parseCommandLine(config) {
|
||||||
if (argv[command] === 'false') {
|
if (argv[command] === 'false') {
|
||||||
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
|
// Show --help
|
||||||
|
|
Loading…
Reference in New Issue