Skip to content

Commit

Permalink
Fixed setReferringUrlQueryParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
nsingh-branch committed Oct 3, 2023
1 parent 514b2f8 commit 18f1636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Branch-SDK/src/main/java/io/branch/referral/PrefHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -704,10 +704,10 @@ public String getAppStoreSource(){
* @param referringUrlQueryParameters
*/
public void setReferringUrlQueryParameters(JSONObject referringUrlQueryParameters) {
if (referringUrlQueryParameters.length() == 0) {
if (referringUrlQueryParameters == null || referringUrlQueryParameters.length() == 0) {
setString(KEY_REFERRING_URL_QUERY_PARAMETERS, NO_STRING_VALUE);
} else {
setString(KEY_REFERRING_URL_QUERY_PARAMETERS, String.valueOf(referringUrlQueryParameters));
setString(KEY_REFERRING_URL_QUERY_PARAMETERS, referringUrlQueryParameters.toString());
}
}

Expand Down

0 comments on commit 18f1636

Please sign in to comment.