Skip to content

Commit 5099aca

Browse files
zzorbakadikraman
authored andcommitted
Fix null response for 'scope' (#259)
1 parent d661279 commit 5099aca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android/src/main/java/com/rnappauth/utils/TokenResponseFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.rnappauth.utils;
22

3+
import android.text.TextUtils;
4+
35
import com.facebook.react.bridge.Arguments;
46
import com.facebook.react.bridge.WritableArray;
57
import com.facebook.react.bridge.WritableMap;
@@ -29,7 +31,7 @@ private static final WritableMap createAdditionalParametersMap(Map<String, Strin
2931

3032
private static final WritableArray createScopeArray(String scope) {
3133
WritableArray scopeArray = Arguments.createArray();
32-
if (!scope.isEmpty()) {
34+
if (!TextUtils.isEmpty(scope)) {
3335
String[] scopesArray = scope.split(" ");
3436

3537
for( int i = 0; i < scopesArray.length - 1; i++)

0 commit comments

Comments
 (0)