Skip to content

Commit

Permalink
fix(Tacking): check if uri is hierarchical
Browse files Browse the repository at this point in the history
Checks if the given uri is hierarchical, as otherwise the
`getQueryParameterNames` function will throw an exception.
  • Loading branch information
FineFindus committed Aug 1, 2024
1 parent 43afbb7 commit f1d40f8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class Tracking{
@NonNull
public static String removeTrackingParameters(@NonNull String url){
Uri uri=Uri.parse(url);
if(uri==null)
if(uri==null || !uri.isHierarchical())
return url;
Uri.Builder uriBuilder=uri.buildUpon().clearQuery();

Expand Down

0 comments on commit f1d40f8

Please sign in to comment.