fix api返回nil 导致的崩溃

master
wanghualei 2022-12-22 14:11:16 +08:00
parent 0320812750
commit 128d81ae0b
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ static MopPlugin *_instance;
MOPBaseApi* api = [MOPApiConverter apiWithRequest: request];
if (api) {
[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) {
if ([error isKindOfClass:[NSDictionary class]]) {
NSDictionary* dict = (NSDictionary*)error;