mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Introduce "Options" argument to "fetchSegment()" function
Reviewed By: jeanlauliac Differential Revision: D7791186 fbshipit-source-id: e3954a525e6e3b02a48ac19f78cc3716969dd6bf
This commit is contained in:
committed by
Facebook Github Bot
parent
065b9991a9
commit
333602b9f2
@@ -162,6 +162,7 @@ BatchedBridge.registerLazyCallableModule('JSDevSupportModule', () => require('JS
|
||||
|
||||
global.__fetchSegment = function(
|
||||
segmentId: number,
|
||||
options: {|+otaBuildNumber: ?string|},
|
||||
callback: (?Error) => void,
|
||||
) {
|
||||
const {SegmentFetcher} = require('NativeModules');
|
||||
@@ -170,7 +171,7 @@ global.__fetchSegment = function(
|
||||
'included as a NativeModule.');
|
||||
}
|
||||
|
||||
SegmentFetcher.fetchSegment(segmentId, (errorObject: ?{message: string, code: string}) => {
|
||||
SegmentFetcher.fetchSegment(segmentId, options, (errorObject: ?{message: string, code: string}) => {
|
||||
if (errorObject) {
|
||||
const error = new Error(errorObject.message);
|
||||
(error: any).code = errorObject.code;
|
||||
|
||||
Reference in New Issue
Block a user