fix api返回nil 导致的崩溃
parent
0320812750
commit
128d81ae0b
|
@ -93,7 +93,7 @@ static MopPlugin *_instance;
|
||||||
MOPBaseApi* api = [MOPApiConverter apiWithRequest: request];
|
MOPBaseApi* api = [MOPApiConverter apiWithRequest: request];
|
||||||
if (api) {
|
if (api) {
|
||||||
[api setupApiWithSuccess:^(NSDictionary<NSString *,id> * _Nonnull data) {
|
[api setupApiWithSuccess:^(NSDictionary<NSString *,id> * _Nonnull data) {
|
||||||
result(@{@"retMsg":@"ok",@"success":@(YES),@"data": data});
|
result(@{@"retMsg":@"ok",@"success":@(YES),@"data": data ? : @{}});
|
||||||
} failure:^(id _Nullable error) {
|
} failure:^(id _Nullable error) {
|
||||||
if ([error isKindOfClass:[NSDictionary class]]) {
|
if ([error isKindOfClass:[NSDictionary class]]) {
|
||||||
NSDictionary* dict = (NSDictionary*)error;
|
NSDictionary* dict = (NSDictionary*)error;
|
||||||
|
|
Loading…
Reference in New Issue