[RCTConvert] Sort mapping keys alphabetically in RCTLogError
Summary: Closes https://github.com/facebook/react-native/pull/1679 Github Author: Christopher Dro <hello@blick-labs.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
parent
3c72250a1a
commit
5614a04cba
|
@ -187,7 +187,7 @@ NSNumber *RCTConvertEnumValue(const char *typeName, NSDictionary *mapping, NSNum
|
|||
}
|
||||
id value = mapping[json];
|
||||
if (!value && [json description].length > 0) {
|
||||
RCTLogError(@"Invalid %s '%@'. should be one of: %@", typeName, json, [mapping allKeys]);
|
||||
RCTLogError(@"Invalid %s '%@'. should be one of: %@", typeName, json, [[mapping allKeys] sortedArrayUsingSelector: @selector(caseInsensitiveCompare:)]);
|
||||
}
|
||||
return value ?: defaultValue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue