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

Commit

Permalink
adds error catching in animation promise and emits a different messag…
Browse files Browse the repository at this point in the history
…e if caught
  • Loading branch information
zurbchris committed Dec 5, 2015
1 parent 83d2eae commit db6571e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/angular/services/foundation.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@

function animateAndAdvise(element, futureState, animationIn, animationOut) {
var promise = FoundationAnimation.animate(element, futureState, animationIn, animationOut);
promise.finally(function() {
promise.then(function() {
publish(element[0].id, futureState ? 'active-true' : 'active-false');
}, function() {
publish(element[0].id, 'active-aborted');
});
return promise;
}
Expand Down

0 comments on commit db6571e

Please sign in to comment.