Fixed an error in the controller when there are no posts

Signed-off-by: Nathan Lowrie <nate@finelineautomation.com>