Skip to content

Commit

Permalink
fix getPageDescription to return default page description if details …
Browse files Browse the repository at this point in the history
…does not have description.
  • Loading branch information
wildone committed May 17, 2021
1 parent 8758e63 commit bcdd1d7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,10 @@ public static String getPageDescription(Page page) {
Resource detailsResource = resourceResolver.resolve(detailsPath);
if (!ResourceUtil.isNonExistingResource(detailsResource)) {
ValueMap vm = detailsResource.getValueMap();
return vm.get(DETAILS_DESCRIPTION,"");
String detailsDescription = vm.get(DETAILS_DESCRIPTION, "");
if (StringUtils.isEmpty(detailsDescription)) {
return detailsDescription;
}
}


Expand Down

0 comments on commit bcdd1d7

Please sign in to comment.