chore(views): only pass body_attrs if they are set

Cleaning up log notices