Skip to content
Permalink
Browse files

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 8b76684a92d7340175284bb369426f0164673b0a
Showing with 13 additions and 2 deletions.
  1. +11 −0 tests/unit/effects/effects_core.js
  2. +2 −2 ui/jquery.ui.effect.js
@@ -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 );
@@ -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 = {};
}

0 comments on commit 8b76684

Please sign in to comment.
You can’t perform that action at this time.