Skip to content

Commit 005a88d

Browse files
committed
[iOS] Fixes Reject error kind in Fabric
1 parent 73d02fa commit 005a88d

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

  • packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon

packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,10 @@ id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, s
278278
}
279279
return;
280280
}
281-
282-
NSDictionary *jsError = RCTJSErrorFromCodeMessageAndNSError(code, message, error);
283-
reject->call([jsError](jsi::Runtime &rt, jsi::Function &jsFunction) {
284-
jsFunction.call(rt, convertObjCObjectToJSIValue(rt, jsError));
281+
reject->call([message](jsi::Runtime &rt, jsi::Function &jsFunction) {
282+
jsFunction.call(
283+
rt, createJSRuntimeError(rt, [message ?: @"Unknown error from a native module" UTF8String]));
285284
});
286-
287285
resolveWasCalled = NO;
288286
resolve = std::nullopt;
289287
reject = std::nullopt;

0 commit comments

Comments
 (0)