Avoid an error if controller.$error is not defined.