File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -953,16 +953,14 @@ QUnit.jsDump = (function() {
953
953
type = "date" ;
954
954
} else if ( QUnit . is ( "Function" , obj ) ) {
955
955
type = "function" ;
956
- } else if ( QUnit . is ( "Array" , obj ) ) {
957
- type = "array" ;
958
- } else if ( QUnit . is ( "Window" , obj ) || QUnit . is ( "global" , obj ) ) {
956
+ } else if ( obj . setInterval && obj . document && ! obj . nodeType ) {
959
957
type = "window" ;
960
- } else if ( QUnit . is ( "HTMLDocument" , obj ) ) {
958
+ } else if ( obj . nodeType === 9 ) {
961
959
type = "document" ;
962
- } else if ( QUnit . is ( "HTMLCollection" , obj ) || QUnit . is ( "NodeList" , obj ) ) {
963
- type = "nodelist" ;
964
- } else if ( / ^ \[ o b j e c t H T M L / . test ( Object . prototype . toString . call ( obj ) ) ) {
960
+ } else if ( obj . nodeType ) {
965
961
type = "node" ;
962
+ } else if ( typeof obj === "object" && typeof obj . length === "number" && obj . length >= 0 ) {
963
+ type = "array" ;
966
964
} else {
967
965
type = typeof obj ;
968
966
}
You can’t perform that action at this time.
0 commit comments