mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
2015-02-03 updates
- Add back providesModule transform to JSAppServer | Joseph Savona - [ReactKit] fix open source performance issue | John Harper - [ReactKit] improve ReactIOSEventEmitter logics | Andrew Rasmussen - [reactkit] fix web view JS executor and bind it to Command-d | John Harper - Removed hardcoded RCTModuleIDs | Nick Lockwood - [ReactKit] Animated GIF support | Alex Akers - [ReactKit] Update RCTBridge to support non-`id` argument types | Alex Akers - [reactkit] fix typo in RCTCopyProperty() change | John Harper - [reactkit] fix shadow view crash on missing properties | John Harper - [reactkit] fix transform keypath | John Harper
This commit is contained in:
@@ -37,12 +37,14 @@ function createStrictShapeTypeChecker(shapeTypes) {
|
||||
var allKeys = merge(props[propName], shapeTypes);
|
||||
for (var key in allKeys) {
|
||||
var checker = shapeTypes[key];
|
||||
invariant(
|
||||
checker,
|
||||
`Invalid props.${propName} key \`${key}\` supplied to \`${componentName}\`.` +
|
||||
`\nBad object: ` + JSON.stringify(props[propName], null, ' ') +
|
||||
`\nValid keys: ` + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
||||
);
|
||||
if (!checker) {
|
||||
invariant(
|
||||
false,
|
||||
`Invalid props.${propName} key \`${key}\` supplied to \`${componentName}\`.` +
|
||||
`\nBad object: ` + JSON.stringify(props[propName], null, ' ') +
|
||||
`\nValid keys: ` + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
||||
);
|
||||
}
|
||||
var error = checker(propValue, key, componentName, location);
|
||||
if (error) {
|
||||
invariant(
|
||||
|
||||
Reference in New Issue
Block a user