Skip to content

Commit 5e78402

Browse files
committed
Fixed an issue when currentScope was undefined
1 parent ac4af79 commit 5e78402

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/viewDirective.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ function $ViewDirective( $state, $injector, $uiViewScroll) {
210210

211211
var clone = $transclude(newScope, function(clone) {
212212
renderer.enter(clone, $element, function onUiViewEnter() {
213-
currentScope.$emit('$viewContentAnimationEnded');
213+
if(currentScope) {
214+
currentScope.$emit('$viewContentAnimationEnded');
215+
}
214216

215217
if (angular.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {
216218
$uiViewScroll(clone);

0 commit comments

Comments
 (0)