mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-21 10:34:31 +08:00
Replace MethodCallResult with folly::Optional
Reviewed By: AaaChiuuu Differential Revision: D4481987 fbshipit-source-id: 945dd671eb2482f3c6b626192aa2181c5bfd906f
This commit is contained in:
committed by
Facebook Github Bot
parent
7812b82b18
commit
4d2512aef9
@@ -877,10 +877,10 @@ JSValueRef JSCExecutor::nativeCallSyncHook(
|
||||
moduleId,
|
||||
methodId,
|
||||
std::move(args));
|
||||
if (result.isUndefined) {
|
||||
if (!result.hasValue()) {
|
||||
return Value::makeUndefined(m_context);
|
||||
}
|
||||
return Value::fromDynamic(m_context, result.result);
|
||||
return Value::fromDynamic(m_context, result.value());
|
||||
}
|
||||
|
||||
} }
|
||||
|
||||
Reference in New Issue
Block a user