Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(swipe): safe apply the callback
Browse files Browse the repository at this point in the history
Fixes the swipe directive occasionally throwing "$digest in progress" errors.

Fixes #8318.
  • Loading branch information
crisbeto committed May 18, 2016
1 parent c26842a commit 53fed62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/swipe/swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function getDirective(name) {
function postLink(scope, element, attr) {
var fn = $parse(attr[directiveName]);
element.on(eventName, function(ev) {
scope.$apply(function() { fn(scope, { $event: ev }); });
scope.$applyAsync(function() { fn(scope, { $event: ev }); });
});
}
}
Expand Down

0 comments on commit 53fed62

Please sign in to comment.