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

'isOpen' of undefined $destroy popover #4683

Closed
ghost opened this issue Oct 22, 2015 · 3 comments
Closed

'isOpen' of undefined $destroy popover #4683

ghost opened this issue Oct 22, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 22, 2015

I thought this was fixed in #4552 but seems not, when destroying a directive this shows:
TypeError: Cannot set property 'isOpen' of undefined

        if (isOpenParse) {
          scope.$watch(isOpenParse, function(val) {
            /*jshint -W018 */
            if (!val === ttScope.isOpen) {
              toggleTooltipBind();
            }
            /*jshint +W018 */
          });
        }

Shouldnt there be a ttScope check before?

@RobJacobs
Copy link
Contributor

Please provide a plunk demonstrating the problem.

@icfantv
Copy link
Contributor

icfantv commented Oct 22, 2015

@therealtomas, if you think you've found a bug, please follow these instructions.

Unfortunately, if you think you have found a bug and do not follow the above instructions within a reasonable amount of time, we will close the issue due to lack of activity.

@wesleycho
Copy link
Contributor

@RobJacobs this seems related to the garbage collection issues we had - we should probably do

if (!ttScope.isOpen || !val === ttScope.isOpen) {
  toggleTooltipBind()
}

or something similarly appropriate

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants