File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,11 @@ +(BOOL)requiresMainQueueSetup
26
26
reject:(RCTPromiseRejectBlock)reject)
27
27
{
28
28
[_mapService openServiceWithAppId: appId appSecurity: appSecurity enterpriseSenderCode: enterpriseSenderCode environment: environment listener: ^(id model, NSError * error) {
29
- resolve (model);
29
+ if (error) {
30
+ reject (@" -14001" , error.localizedDescription , error);
31
+ } else {
32
+ resolve (model);
33
+ }
30
34
}];
31
35
}
32
36
@@ -35,7 +39,11 @@ +(BOOL)requiresMainQueueSetup
35
39
reject:(RCTPromiseRejectBlock)reject)
36
40
{
37
41
[_mapService startLocationWithShippingNoteInfos: shippingNoteInfos listener: ^(id _Nonnull model, NSError * _Nonnull error) {
38
- resolve (model);
42
+ if (error) {
43
+ reject (@" -14002" , error.localizedDescription , error);
44
+ } else {
45
+ resolve (model);
46
+ }
39
47
}];
40
48
}
41
49
@@ -44,7 +52,11 @@ +(BOOL)requiresMainQueueSetup
44
52
reject:(RCTPromiseRejectBlock)reject)
45
53
{
46
54
[_mapService stopLocationWithShippingNoteInfos: shippingNoteInfos listener: ^(id _Nonnull model, NSError * _Nonnull error) {
47
- resolve (model);
55
+ if (error) {
56
+ reject (@" -14003" , error.localizedDescription , error);
57
+ } else {
58
+ resolve (model);
59
+ }
48
60
}];
49
61
}
50
62
You can’t perform that action at this time.
0 commit comments