From: David Serduke Date: Wed, 28 Nov 2007 23:53:54 +0000 (+0000) Subject: Back out one of the changes from the previous commit that wasn't necessary to fix... X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=b6d70a7ce3795e8c1306a513b89a31de0c5f0a13;p=jquery.git Back out one of the changes from the previous commit that wasn't necessary to fix the bug and might not be desired. --- diff --git a/src/core.js b/src/core.js index 4c12150..62e41c9 100644 --- a/src/core.js +++ b/src/core.js @@ -553,7 +553,7 @@ jQuery.extend = jQuery.fn.extend = function() { target[ name ] = jQuery.extend( target[ name ], options[ name ] ); // Don't bring in undefined values - else if ( options[ name ] !== undefined ) + else if ( options[ name ] != undefined ) target[ name ] = options[ name ]; } diff --git a/test/unit/core.js b/test/unit/core.js index f039304..ce70be6 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -874,7 +874,7 @@ test("$.extend(Object, Object)", function() { ok( typeof ret.foo != "string", "Check to make sure values equal with coersion (but not actually equal) overwrite correctly" ); var ret = jQuery.extend(true, { foo:"bar" }, { foo:null } ); - equals( ret.foo, null, "Check to make sure values equal with coersion (but not actually equal) overwrite correctly" ); + ok( typeof ret.foo !== 'undefined', "Make sure a null value doesn't crash with deep extend, for #1908" ); var defaults = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, defaultsCopy = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },