1
0
Fork 0

Corrected client-side assert.deepEqual() to only perform object/array operations if both provided values are objects/arrays respectively

closure/master
Mike Gerwitz 2011-06-11 21:32:11 -04:00
parent a929c42a3f
commit d6873d1cc9
1 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ module.assert = { exports: {
return;
}
if ( cmp instanceof Array )
if ( ( cmp instanceof Array ) && ( val instanceof Array ) )
{
var i = 0,
len = cmp.length;
@ -86,7 +86,7 @@ module.assert = { exports: {
return;
}
else if ( cmp instanceof Object )
else if ( ( typeof cmp === 'object' ) && ( typeof val === 'object' ) )
{
for ( var i in cmp )
{