Wouldn't it be better to do `totalHits >= page * limit` maybe? Then for cases where you have exactly 12 and no more, you would correctly not show older.