Effects: Allow 'null' for options - Fixes #8670 - null reference when using effects - Closes gh-783

This commit is contained in:
Corey Frang 2012-10-21 16:46:38 -05:00
parent fd9b355a8e
commit 8b76684a92
2 changed files with 13 additions and 2 deletions

View File

@ -31,6 +31,17 @@ test( "Immediate Return Conditions", function() {
equal( ++count, 3, "Both Functions worked properly" ); 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 /* TODO: Disabled - Can't figure out why this is failing in IE 6/7
test( "createWrapper and removeWrapper retain focused elements (#7595)", function() { test( "createWrapper and removeWrapper retain focused elements (#7595)", function() {
expect( 2 ); expect( 2 );

View File

@ -1054,8 +1054,8 @@ function _normalizeArguments( effect, options, speed, callback ) {
// convert to an object // convert to an object
effect = { effect: effect }; effect = { effect: effect };
// catch (effect) // catch (effect, null, ...)
if ( options === undefined ) { if ( options == null ) {
options = {}; options = {};
} }