From d9e3dd5c4429c64b3f7e46f9a023ae6d8d56b50b Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Sun, 29 Nov 2015 07:21:25 -0800 Subject: [PATCH] chore(carousel): combine animation check - Combine animation check since $animate.enabled value is set in the $watcher Closes #4976 --- src/carousel/carousel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/carousel/carousel.js b/src/carousel/carousel.js index 1ca932d0a6..773688bf7a 100644 --- a/src/carousel/carousel.js +++ b/src/carousel/carousel.js @@ -28,7 +28,7 @@ angular.module('ui.bootstrap.carousel', []) angular.extend(slide, {direction: direction, active: true}); angular.extend(self.currentSlide || {}, {direction: direction, active: false}); - if ($animate.enabled() && !$scope.noTransition && !$scope.$currentTransition && + if ($animate.enabled($element) && !$scope.$currentTransition && slide.$element && self.slides.length > 1) { slide.$element.data(SLIDE_DIRECTION, slide.direction); if (self.currentSlide && self.currentSlide.$element) {