Skip to content

Commit

Permalink
fix(ios): null exception when converting JSI object to dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed May 16, 2024
1 parent f38ae3c commit 4249f3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/ios/module/turbo/HippyOCTurboModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ static id convertJSIObjectToNSObject(const std::shared_ptr<hippy::napi::Ctx> &co
}
std::u16string u16Key = StringViewUtils::ConvertEncoding(string_view, string_view::Encoding::Utf16).utf16_value();
NSString *stringKey = [NSString stringWithCharacters:(const unichar*)u16Key.c_str() length:(u16Key.length())];
id objValue = convertCtxValueToObjcObject(context, value, module);
id objValue = convertCtxValueToObjcObject(context, value, module) ?: [NSNull null];
[result setObject:objValue forKey:stringKey];
}
return [result copy];
Expand Down

0 comments on commit 4249f3a

Please sign in to comment.