[React Native] Update additional callsites with RCTResponseErrorBlock

This commit is contained in:
Alex Akers 2015-07-14 03:51:22 -07:00
parent be2cabc3f8
commit a65bbe14d3
1 changed files with 2 additions and 2 deletions

View File

@ -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"));
}
}