Skip to content

Commit

Permalink
[iOS] Fixes Reject error kind in Fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed Jan 4, 2024
1 parent 73d02fa commit 005a88d
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,10 @@ id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, s
}
return;
}

NSDictionary *jsError = RCTJSErrorFromCodeMessageAndNSError(code, message, error);
reject->call([jsError](jsi::Runtime &rt, jsi::Function &jsFunction) {
jsFunction.call(rt, convertObjCObjectToJSIValue(rt, jsError));
reject->call([message](jsi::Runtime &rt, jsi::Function &jsFunction) {
jsFunction.call(
rt, createJSRuntimeError(rt, [message ?: @"Unknown error from a native module" UTF8String]));
});

resolveWasCalled = NO;
resolve = std::nullopt;
reject = std::nullopt;
Expand Down

0 comments on commit 005a88d

Please sign in to comment.