fknop / hapi-pagination

Hapi plugin to handle "custom" pagination
MIT License
63 stars 36 forks source link

totalCount and pageCount values when result set is empty #8

Closed richardlay closed 8 years ago

richardlay commented 8 years ago

If an empty result set is returned, i.e. reply.paginate([], 0), totalCount and pageCount are null. Should these be set to 0?

fknop commented 8 years ago

Indeed, that would make more sense. I'll do that later when I have time, or I'll accept another PR :).

richardlay commented 8 years ago

Yep I can do it. Just wanted to ask first. Thanks.

fknop commented 8 years ago

Yep I can do it. Just wanted to ask first. Thanks.

It's already done, but thanks !