Prevent error $digest already in progress when calling $scope.$apply()

Hi, I was seeing the $digest already in progress error in my app but also on http://snapjay.github.io/angularjs-breakpoint/ 
Have added a simple check to only fire when it's not in progress.

Ciao
Cezar