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

Commit 715dd34

Browse files
crisbetoThomasBurleson
authored andcommitted
fix(swipe): safe apply the callback
Fixes the swipe directive occasionally throwing "$digest in progress" errors. Fixes #8318. Closes #8497
1 parent 4950820 commit 715dd34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/swipe/swipe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function getDirective(name) {
8686
function postLink(scope, element, attr) {
8787
var fn = $parse(attr[directiveName]);
8888
element.on(eventName, function(ev) {
89-
scope.$apply(function() { fn(scope, { $event: ev }); });
89+
scope.$applyAsync(function() { fn(scope, { $event: ev }); });
9090
});
9191
}
9292
}

0 commit comments

Comments
 (0)