Skip to content

Commit fc5c3b4

Browse files
committed
Merge pull request #42 from mag382/undefined-check-on-fast-close
Added an undefined check in the condition that checks if the notificatio...
2 parents b43094d + a03dbd4 commit fc5c3b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jquery.jgrowl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
if ($.support.opacity === false)
280280
this.style.removeAttribute('filter');
281281

282-
if ( $(this).data("jGrowl") !== null ) // Happens when a notification is closing before it's open.
282+
if ( $(this).data("jGrowl") !== null && typeof $(this).data("jGrowl") !== 'undefined') // Happens when a notification is closing before it's open.
283283
$(this).data("jGrowl").created = new Date();
284284

285285
$(this).trigger('jGrowl.afterOpen');
@@ -375,4 +375,4 @@
375375
/** Reference the Defaults Object for compatibility with older versions of jGrowl **/
376376
$.jGrowl.defaults = $.fn.jGrowl.prototype.defaults;
377377

378-
})(jQuery);
378+
})(jQuery);

0 commit comments

Comments
 (0)