[React Native] Update additional callsites with RCTResponseErrorBlock
This commit is contained in:
parent
be2cabc3f8
commit
a65bbe14d3
|
@ -20,12 +20,12 @@ RCT_EXPORT_MODULE()
|
|||
@synthesize bridge = _bridge;
|
||||
|
||||
RCT_EXPORT_METHOD(getScriptText:(RCTResponseSenderBlock)successCallback
|
||||
failureCallback:(RCTResponseSenderBlock)failureCallback)
|
||||
failureCallback:(RCTResponseErrorBlock)failureCallback)
|
||||
{
|
||||
if (self.scriptText && self.scriptURL) {
|
||||
successCallback(@[@{@"text": self.scriptText, @"url":[self.scriptURL absoluteString]}]);
|
||||
} else {
|
||||
failureCallback(@[RCTMakeError(@"Source code is not available", nil, nil)]);
|
||||
failureCallback(RCTErrorWithMessage(@"Source code is not available"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue