Skip to content

Commit

Permalink
fix(transition): not checking for event object lead to TypeError
Browse files Browse the repository at this point in the history
This PR fixes a regression of #698 where it was not covered that the completemethod could have been called outside of an event, thus the event object was not available and accessing it lead into a TypeError

Closes #745
  • Loading branch information
lubber-de authored and Sean committed May 17, 2019
1 parent 7be57fc commit 0c56c8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/definitions/modules/transition.js
Expand Up @@ -215,7 +215,7 @@ $.fn.transition = function() {
},

complete: function (event) {
if(event.target === element) {
if(event && event.target === element) {
event.stopPropagation();
}
module.debug('Animation complete', settings.animation);
Expand Down

0 comments on commit 0c56c8d

Please sign in to comment.