mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-23 19:25:54 +00:00
Fix crash when passing wrong type to percentage prop
This commit is contained in:
@@ -47,6 +47,9 @@ static NSRegularExpression* percentageRegExp;
|
||||
|
||||
+ (BOOL)isPercentage:(NSString *) string
|
||||
{
|
||||
if (![string isKindOfClass:[NSString class]]) {
|
||||
return NO;
|
||||
}
|
||||
return [percentageRegExp firstMatchInString:string options:0 range:NSMakeRange(0, [string length])] != nil;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user