Add some tests for jQuery.isWindow and make sure that we're operating against an...
[jquery.git] / src / core.js
index 9cb519b..b747e5b 100644 (file)
@@ -476,7 +476,7 @@ jQuery.extend({
 
        // A crude way of determining if an object is a window
        isWindow: function( obj ) {
-               return "setInterval" in obj;
+               return obj && typeof obj === "object" && "setInterval" in obj;
        },
 
        type: function( obj ) {