Skip to content

Commit

Permalink
#47 - be careful to not assume that the tooltip defined is, in fact, …
Browse files Browse the repository at this point in the history
…the type of tooltip we are expecting
  • Loading branch information
coladarci committed Feb 29, 2016
1 parent 1114590 commit ec1bdb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/mixins/components/tooltips.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default Ember.Mixin.create({
destroyTooltip: on('willDestroyElement', function() {
const tooltip = this.get('tooltip');

if (tooltip) {
if (tooltip && tooltip.effect && tooltip.detach) {
tooltip.effect(null); // Remove animation
tooltip.detach(); // Remove the tooltip from the document
this.$().off(); // Remove all event listeners
Expand Down

0 comments on commit ec1bdb8

Please sign in to comment.