FIX: prevent executing the $apply when another is in progress

Checks if a digest has been executed and prevent calling the $apply