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

Commit

Permalink
fix(tooltip): check for ttScope in $$postDigest
Browse files Browse the repository at this point in the history
In the tooltip $$postDigest function a check is done
on ttScope.isOpen but ttScope may have been set to null
in the scope.$on('$destroy'...) function.  Added a
check to make sure ttScope is defined and not null.

Closes #4555
Fixes #4552
  • Loading branch information
RobJacobs committed Oct 8, 2015
1 parent c9ab5f6 commit 01b9624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s
repositionScheduled = true;
tooltipLinkedScope.$$postDigest(function() {
repositionScheduled = false;
if (ttScope.isOpen) {
if (ttScope && ttScope.isOpen) {
positionTooltip();
}
});
Expand Down

0 comments on commit 01b9624

Please sign in to comment.