Fix ObjCTurboModule::getArgumentTypeName

Summary: In `ObjCTurboModule::getArgumentTypeName`, I replaced all instances of `':'` with `''` to transform the selector into a TurboModule methodName. This transformation works when the method has 0 or 1 argument, however, it breaks when the method has more than 1 argument. In all cases, we just want to get the substring until the first `':'`.

Reviewed By: fkgozali

Differential Revision: D15056937

fbshipit-source-id: 3a7dce1ce62ca9758e46c0af951b269166d68454
This commit is contained in:
Ramanpreet Nara
2019-04-23 17:47:07 -07:00
committed by Facebook Github Bot
parent e4392b773c
commit e7a8b26f22

View File

@@ -444,7 +444,7 @@ NSString* ObjCTurboModule::getArgumentTypeName(NSString* methodName, int argInde
[argumentTypes addObject:arguments[j].type];
}
NSString *normalizedOtherMethodName = [otherMethodName stringByReplacingOccurrencesOfString:@":" withString:@""];
NSString *normalizedOtherMethodName = [otherMethodName componentsSeparatedByString:@":"][0];
methodArgumentTypeNames[normalizedOtherMethodName] = argumentTypes;
}