Skip to content

Commit 0d523ed

Browse files
author
Paul Bakaus
committed
effects core: the second argument passed to effect methods wasn't checked for being a callback function (fixes #4181 - Effects methods don't allow callback as the second parameter)
1 parent 3ef80b3 commit 0d523ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ui/effects.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function _normalizeArguments(a, m) {
136136
var o = a[1] && a[1].constructor == Object ? a[1] : {}; if(m) o.mode = m;
137137
var speed = a[1] && a[1].constructor != Object ? a[1] : (o.duration ? o.duration : a[2]); //either comes from options.duration or the secon/third argument
138138
speed = $.fx.off ? 0 : typeof speed === "number" ? speed : $.fx.speeds[speed] || $.fx.speeds._default;
139-
var callback = o.callback || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] );
139+
var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] );
140140

141141
return [a[0], o, speed, callback];
142142

0 commit comments

Comments
 (0)