mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 13:35:20 -05:00
Add some tests for jQuery.isWindow and make sure that we're operating against an object before testing.
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user