Skip to content

Commit

Permalink
Make sure there is data before deleting from it
Browse files Browse the repository at this point in the history
  • Loading branch information
sth committed Mar 2, 2019
1 parent 1e121b1 commit f4f6321
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jquery.hoverIntent.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@

// triggers given `out` function at configured `timeout` after a mouseleave and clears state
var delay = function(ev,$el,s,out) {
delete $el.data('hoverIntent')[s.id];
var data = $el.data('hoverIntent');
if (data) {
delete data[s.id];
}
return out.apply($el[0],[ev]);
};

Expand Down

0 comments on commit f4f6321

Please sign in to comment.