Skip to content
This repository was archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
fix(macTooltip): Fixed tooltip possibly watching an undefined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlee44 committed Sep 12, 2013
1 parent 842143b commit bc236b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/directives/tooltip.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ angular.module("Mac").directive "macTooltip", [

enabled = true

scope.$watch attrs.macTooltipDisabled, (value) ->
disabled = value
if attrs.macTooltipDisabled?
scope.$watch attrs.macTooltipDisabled, (value) ->
disabled = value

scope.$on "$destroy", ->
removeTip() if tooltip?
Expand Down

0 comments on commit bc236b2

Please sign in to comment.