diff --git a/Libraries/Animation/AnimationUtils.js b/Libraries/Animation/AnimationUtils.js index ac62465a02e219..2ee2d8a7097591 100644 --- a/Libraries/Animation/AnimationUtils.js +++ b/Libraries/Animation/AnimationUtils.js @@ -231,8 +231,10 @@ module.exports = { var tickCount = Math.round(duration * ticksPerSecond / 1000); var samples = []; - for (var i = 0; i <= tickCount; i++) { - samples.push(easing.call(defaults, i / tickCount)); + if (tickCount > 0) { + for (var i = 0; i <= tickCount; i++) { + samples.push(easing.call(defaults, i / tickCount)); + } } return samples; diff --git a/Libraries/Animation/RCTAnimationExperimentalManager.m b/Libraries/Animation/RCTAnimationExperimentalManager.m index 64ee577fef30b6..6bcda39ae30d83 100644 --- a/Libraries/Animation/RCTAnimationExperimentalManager.m +++ b/Libraries/Animation/RCTAnimationExperimentalManager.m @@ -114,7 +114,7 @@ static void RCTInvalidAnimationProp(RCTSparseArray *callbacks, NSNumber *tag, NS animationTag:(NSNumber *)animationTag duration:(NSTimeInterval)duration delay:(NSTimeInterval)delay - easingSample:(NSArray *)easingSample + easingSample:(NSNumberArray *)easingSample properties:(NSDictionary *)properties callback:(RCTResponseSenderBlock)callback) { diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index a5d2239af57364..9c27b95d98de4f 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -805,7 +805,9 @@ + (UIFont *)UIFont:(UIFont *)font withFamily:(id)family for (NSInteger i = 0; i < idx; i++) { [(NSMutableArray *)values addObject:json[i]]; } - [(NSMutableArray *)values addObject:value]; + if (value) { + [(NSMutableArray *)values addObject:value]; + } copy = YES; } }];