From 8b89f8c59bacb1261639c909ee60fe3b856b36e4 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Wed, 22 Apr 2015 15:50:43 +0200 Subject: Effect: Make .transfer() callback optional Adds two tests to at least check that no exception is thrown. Fixes #12223 Closes gh-1545 --- ui/effect.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/effect.js b/ui/effect.js index cc9a91045..a946c6e8b 100644 --- a/ui/effect.js +++ b/ui/effect.js @@ -1505,7 +1505,9 @@ $.fn.extend({ }) .animate( animation, options.duration, options.easing, function() { transfer.remove(); - done(); + if ( $.isFunction( done ) ) { + done(); + } }); } }); -- cgit v1.2.3