mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 22:37:14 +08:00
Unbreak RN JS server for Android.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user