Commit b256a3a2 authored by rkatic's avatar rkatic Committed by John Resig

Added a method to myKlass.

If an object's prototype is "empty", then isObject returns true!
parent c2bbcd88
...@@ -550,6 +550,8 @@ test("jQuery.extend(Object, Object)", function() { ...@@ -550,6 +550,8 @@ test("jQuery.extend(Object, Object)", function() {
same( empty.foo, optionsWithDate.foo, "Dates copy correctly" ); same( empty.foo, optionsWithDate.foo, "Dates copy correctly" );
var myKlass = function() {}; var myKlass = function() {};
// Makes the class a little more realistic
myKlass.prototype = { someMethod: function(){} };
empty = {}; empty = {};
var optionsWithCustomObject = { foo: { date: new myKlass } }; var optionsWithCustomObject = { foo: { date: new myKlass } };
jQuery.extend(true, empty, optionsWithCustomObject); jQuery.extend(true, empty, optionsWithCustomObject);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment