Skip to content

Commit

Permalink
Additional check
Browse files Browse the repository at this point in the history
  • Loading branch information
HTMLGuyLLC committed Jan 16, 2019
1 parent 07e0bf5 commit 585b40f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions jTippy.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
},
//remove class on blur for hoverfocus
hoverfocusBlur: function(){
if( helper.dom_wrapped.length ) {
if( helper.dom_wrapped && helper.dom_wrapped.length ) {
helper.dom_wrapped.removeClass('jt-focused');
}
helper.hide();
Expand Down Expand Up @@ -257,7 +257,7 @@
//remove accessbility props
helper.dom.attr('aria-describedby', null);
//remove from dom
if( helper.tooltip.length ) {
if( helper.tooltip && helper.tooltip.length ) {
helper.tooltip.remove();
}
//remove blurring to body
Expand Down Expand Up @@ -332,7 +332,7 @@
'margin-left': -(tooltip_width / 2),
'margin-top': -(tooltip_height / 2)
});
if( arrow.length ) {
if( arrow && arrow.length ) {
arrow.remove();
}
helper.positionDebug('-- Done positioning --');
Expand Down
2 changes: 1 addition & 1 deletion jTippy.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 585b40f

Please sign in to comment.