Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Assert the class is the same, not return nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoNatan committed Jul 8, 2017
1 parent 5ed3d6a commit dc1a8fa
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions LNInterpolation/Color+Interpolation.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ - (instancetype)interpolateToValue:(Color*)toValue progress:(double)p

- (instancetype)interpolateToValue:(id)toValue progress:(double)p behavior:(LNInterpolationBehavior)behavior
{
if([toValue isKindOfClass:[Color class]] == NO)
{
return nil;
}
NSParameterAssert([toValue isKindOfClass:[Color class]]);

if(p <= 0)
{
Expand Down

0 comments on commit dc1a8fa

Please sign in to comment.