Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Effects: Allow 'null' for options - Fixes #8670 - null reference when…
… using effects - Closes gh-783
  • Loading branch information
gnarf committed Oct 21, 2012
1 parent fd9b355 commit 8b76684
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions tests/unit/effects/effects_core.js
Expand Up @@ -31,6 +31,17 @@ test( "Immediate Return Conditions", function() {
equal( ++count, 3, "Both Functions worked properly" );
});

asyncTest( "Parse of null for options", function() {
var hidden = $( "div.hidden" ),
count = 0;
expect( 1 );
hidden.show( "blind", null, 1, function() {
equal( ++count, 1, "null for options still works" );
start();
});
});


/* TODO: Disabled - Can't figure out why this is failing in IE 6/7
test( "createWrapper and removeWrapper retain focused elements (#7595)", function() {
expect( 2 );
Expand Down
4 changes: 2 additions & 2 deletions ui/jquery.ui.effect.js
Expand Up @@ -1054,8 +1054,8 @@ function _normalizeArguments( effect, options, speed, callback ) {
// convert to an object
effect = { effect: effect };

// catch (effect)
if ( options === undefined ) {
// catch (effect, null, ...)
if ( options == null ) {
options = {};
}

Expand Down

0 comments on commit 8b76684

Please sign in to comment.