Skip to content

Commit 33b5f51

Browse files
committed
Fixed: page links without items
1 parent 1e2e79e commit 33b5f51

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/thymeleaf/dialect/springdata/decorator/FullPaginationDecorator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public String decorate(final IProcessableElementTag tag, final ITemplateContext
5151
}
5252

5353
private String createPageLinks(final Page<?> page, final ITemplateContext context) {
54+
if( page.getTotalElements()==0 ){
55+
return Strings.EMPTY;
56+
}
57+
5458
int pageSplit = DEFAULT_PAGE_SPLIT;
5559
Object paramValue = context.getVariable(Keys.PAGINATION_SPLIT_KEY);
5660
if (paramValue != null) {

0 commit comments

Comments
 (0)