Skip to content

Commit 8b76684

Browse files
committed
Effects: Allow 'null' for options - Fixes #8670 - null reference when using effects - Closes jquerygh-783
1 parent fd9b355 commit 8b76684

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

tests/unit/effects/effects_core.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ test( "Immediate Return Conditions", function() {
3131
equal( ++count, 3, "Both Functions worked properly" );
3232
});
3333

34+
asyncTest( "Parse of null for options", function() {
35+
var hidden = $( "div.hidden" ),
36+
count = 0;
37+
expect( 1 );
38+
hidden.show( "blind", null, 1, function() {
39+
equal( ++count, 1, "null for options still works" );
40+
start();
41+
});
42+
});
43+
44+
3445
/* TODO: Disabled - Can't figure out why this is failing in IE 6/7
3546
test( "createWrapper and removeWrapper retain focused elements (#7595)", function() {
3647
expect( 2 );

ui/jquery.ui.effect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,8 +1054,8 @@ function _normalizeArguments( effect, options, speed, callback ) {
10541054
// convert to an object
10551055
effect = { effect: effect };
10561056

1057-
// catch (effect)
1058-
if ( options === undefined ) {
1057+
// catch (effect, null, ...)
1058+
if ( options == null ) {
10591059
options = {};
10601060
}
10611061

0 commit comments

Comments
 (0)