Skip to content

Commit 777806c

Browse files
authored
Fix userId occasionally reset on app launch (#561)
1 parent 64d4df6 commit 777806c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

AndroidSDKCore/src/main/java/com/leanplum/Leanplum.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,8 +900,10 @@ private static void handleStartResponse(final JSONObject response) {
900900
}
901901
}
902902

903-
String token = response.optString(Constants.Keys.TOKEN, null);
904-
APIConfig.getInstance().setToken(token);
903+
String token = response.optString(Constants.Keys.TOKEN);
904+
if (!token.isEmpty()) {
905+
APIConfig.getInstance().setToken(token);
906+
}
905907

906908
applyContentInResponse(response);
907909

0 commit comments

Comments
 (0)