mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix crash from setProperty in RCTTurboModule
Summary: Changelog[Internal]: [iOS][Fixed] - Fix crash from calling setProperty in RCTTurboModule The crash is caused by passing a utf8 encoded string to a Object::setProperty overload which only allows ascii inputs. Reviewed By: RSNara Differential Revision: D43705999 fbshipit-source-id: b3f1b3fd27d43d40fe0a170d4c2e60faecc26dad
This commit is contained in:
1 parent
c72c592ecd
commit
caf80d442b
1 file changed
+1
-1
@@ -59,7 +59,7 @@ static jsi::Object convertNSDictionaryToJSIObject(jsi::Runtime &runtime, NSDicti
|
||||
{
|
||||
jsi::Object result = jsi::Object(runtime);
|
||||
for (NSString *k in value) {
|
||||
result.setProperty(runtime, [k UTF8String], convertObjCObjectToJSIValue(runtime, value[k]));
|
||||
result.setProperty(runtime, convertNSStringToJSIString(runtime, k), convertObjCObjectToJSIValue(runtime, value[k]));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user