Skip to content
Permalink
Browse files

Added a method to myKlass.

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 b256a3a266721f04d38dca59e56b37b9a682b2f2
Showing with 2 additions and 0 deletions.
  1. +2 −0 test/unit/core.js
@@ -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);

0 comments on commit b256a3a

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