From 211b3b55b15ab598f08bd41e29bf0fb8b7125ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 24 Jan 2019 13:55:53 +0100 Subject: [PATCH] ios: simplify code --- ios/sdk/src/dropbox/Dropbox.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ios/sdk/src/dropbox/Dropbox.m b/ios/sdk/src/dropbox/Dropbox.m index e4ca8bf0f..7b9e9dc72 100644 --- a/ios/sdk/src/dropbox/Dropbox.m +++ b/ios/sdk/src/dropbox/Dropbox.m @@ -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;