fixes a bug where the rendering of pagination links would break the posts page if the user has not posted anything