Skip to content

Commit

Permalink
Added a method to myKlass.
Browse files Browse the repository at this point in the history
If an object's prototype is "empty", then isObject returns true!
  • Loading branch information
rkatic authored and jeresig committed Nov 9, 2009
1 parent c2bbcd8 commit b256a3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/unit/core.js
Expand Up @@ -550,6 +550,8 @@ test("jQuery.extend(Object, Object)", function() {
same( empty.foo, optionsWithDate.foo, "Dates copy correctly" );

var myKlass = function() {};
// Makes the class a little more realistic
myKlass.prototype = { someMethod: function(){} };
empty = {};
var optionsWithCustomObject = { foo: { date: new myKlass } };
jQuery.extend(true, empty, optionsWithCustomObject);
Expand Down

0 comments on commit b256a3a

Please sign in to comment.