Skip to content

Commit f4f6321

Browse files
committed
Make sure there is data before deleting from it
1 parent 1e121b1 commit f4f6321

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jquery.hoverIntent.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@
8585

8686
// triggers given `out` function at configured `timeout` after a mouseleave and clears state
8787
var delay = function(ev,$el,s,out) {
88-
delete $el.data('hoverIntent')[s.id];
88+
var data = $el.data('hoverIntent');
89+
if (data) {
90+
delete data[s.id];
91+
}
8992
return out.apply($el[0],[ev]);
9093
};
9194

0 commit comments

Comments
 (0)