From 18f163604582c5523d783b63cb2e6a7be3afe018 Mon Sep 17 00:00:00 2001 From: nsingh-branch Date: Tue, 3 Oct 2023 09:19:24 -0700 Subject: [PATCH] Fixed setReferringUrlQueryParameters --- Branch-SDK/src/main/java/io/branch/referral/PrefHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Branch-SDK/src/main/java/io/branch/referral/PrefHelper.java b/Branch-SDK/src/main/java/io/branch/referral/PrefHelper.java index 72de80b3c..bdcf3972e 100644 --- a/Branch-SDK/src/main/java/io/branch/referral/PrefHelper.java +++ b/Branch-SDK/src/main/java/io/branch/referral/PrefHelper.java @@ -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()); } }