Skip to content

Commit

Permalink
ensure list has a path set to current page or resource when its empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Jun 24, 2021
1 parent ab074c5 commit a417c42
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,11 @@ protected void populateChildListItems(String path, Boolean flat) {
childMap.put("path", rootPage.getPath());
} else {
LOGGER.error("populateChildListItems: could not find path {}", path);
childMap.put("path", path);
}

//if no path specified use current page as root or current resource
if (isEmpty(path)) {
childMap.put("path", getCurrentPage() != null ? getCurrentPage().getPath() : getResource().getPath());
}

if (flat) {
Expand Down

0 comments on commit a417c42

Please sign in to comment.