From 1f94104b6993996f77ea3d5e6be67cda267749a5 Mon Sep 17 00:00:00 2001 From: Rob Jacobs Date: Fri, 23 Oct 2015 08:00:43 -0400 Subject: [PATCH] fix(tooltip): null scope check in isOpen watch The watch for the isOpen property from the model was not checking to see if the internal tooltip scope was still valid (null or undefined) before comparing the value to the tooltip scope isOpen property. Closes #4697 Fixes #4683 --- src/tooltip/tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index 2a589d5bb6..cbc7e97e23 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -368,7 +368,7 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s if (isOpenParse) { scope.$watch(isOpenParse, function(val) { /*jshint -W018 */ - if (!val === ttScope.isOpen) { + if (ttScope && !val === ttScope.isOpen) { toggleTooltipBind(); } /*jshint +W018 */