Skip to content

Commit

Permalink
Analysis: Mark theme demo rul as nullable where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ParaskP7 authored and Siobhan committed Dec 4, 2023
1 parent 338d70e commit f0220e1
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,14 @@ public static String getUrl(
.format(THEME_URL_PREVIEW, UrlUtils.getHost(site.getUrl()), domain, theme.getThemeId());
case DEMO:
String url = theme.getDemoUrl();
if (url.contains("?")) {
return url + "&" + THEME_URL_DEMO_PARAMETER;
if (url != null) {
if (url.contains("?")) {
return url + "&" + THEME_URL_DEMO_PARAMETER;
} else {
return url + "?" + THEME_URL_DEMO_PARAMETER;
}
} else {
return url + "?" + THEME_URL_DEMO_PARAMETER;
return null;
}
case DETAILS:
return String.format(THEME_URL_DETAILS, theme.getThemeId());
Expand Down

0 comments on commit f0220e1

Please sign in to comment.