ios: simplify code

This commit is contained in:
Saúl Ibarra Corretgé 2019-01-24 13:55:53 +01:00 committed by Saúl Ibarra Corretgé
parent 8c0317cac0
commit 211b3b55b1
1 changed files with 3 additions and 4 deletions

View File

@ -132,8 +132,6 @@ RCT_EXPORT_METHOD(getSpaceUsage: (NSString *)token
if (authResult) {
if ([authResult isSuccess]) {
currentResolve(authResult.accessToken.accessToken);
currentResolve = nil;
currentReject = nil;
} else {
NSString *msg;
if ([authResult isError]) {
@ -142,9 +140,10 @@ RCT_EXPORT_METHOD(getSpaceUsage: (NSString *)token
msg = @"OAuth canceled!";
}
currentReject(@"authorize", msg, nil);
currentResolve = nil;
currentReject = nil;
}
currentResolve = nil;
currentReject = nil;
return YES;
}
return NO;