Fix $digest already in progress. https://github.com/wspringer/angular-pouchdb/issues/1