mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
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:
committed by
Facebook Github Bot
parent
e4392b773c
commit
e7a8b26f22
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user