Skip to content

Commit

Permalink
Merge pull request #116 from vitalpoltava/master
Browse files Browse the repository at this point in the history
Allow to compare Arrays
  • Loading branch information
dcneiner committed Sep 16, 2013
2 parents bf2eb10 + 6493e30 commit cc3874b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.mockjax.js
Expand Up @@ -69,8 +69,8 @@
identical = false;
return identical;
} else {
// Previously typeof was used which incorrectly reported null as an object (#106)
if ( Object.prototype.toString.call( live[k] ) === '[object Object]' ) {
// This will allow to compare Arrays
if ( typeof live[k] === 'object' && live[k] !== null ) {
identical = identical && isMockDataEqual(mock[k], live[k]);
} else {
if ( mock[k] && $.isFunction( mock[k].test ) ) {
Expand Down

0 comments on commit cc3874b

Please sign in to comment.