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

fix(tooltip): null scope check in isOpen watch #4697

Merged
merged 1 commit into from
Oct 23, 2015
Merged

fix(tooltip): null scope check in isOpen watch #4697

merged 1 commit into from
Oct 23, 2015

Conversation

RobJacobs
Copy link
Contributor

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

@RobJacobs
Copy link
Contributor Author

I'm not sure how to add a test for this. The scenario is the element with the tooltip attached has it's scope destroyed and falls into the scope.$on('$destroy' function where ttScope is set to null. The person reporting the problem (with no plunk) claims an error is being thrown (Cannot set property 'isOpen' of undefined) in the watch on the element scope isOpen here. How would I set the element scope isOpen property to trigger the call to the watch function after the element scope is destroyed?

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
@RobJacobs RobJacobs merged commit 1f94104 into angular-ui:master Oct 23, 2015
@RobJacobs RobJacobs deleted the fix-tooltip-4638 branch October 23, 2015 20:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants