Stuck in "loading" data if there is no 'dates'

The date of the starting page is set with the date of the
first dates element. But there is no test of posts existance. 
The starting page date should be its date or the current 
date if it's not set.