@@ -50,28 +50,18 @@ function matchItems(array1, array2, index1, index2, context) {
50
50
// no way to match objects was provided, try match by position
51
51
return context . matchByPosition && index1 === index2 ;
52
52
}
53
- let hash1 ;
54
- let hash2 ;
55
- if ( typeof index1 === 'number' ) {
56
- context . hashCache1 = context . hashCache1 || [ ] ;
57
- hash1 = context . hashCache1 [ index1 ] ;
58
- if ( typeof hash1 === 'undefined' ) {
59
- context . hashCache1 [ index1 ] = hash1 = objectHash ( value1 , index1 ) ;
60
- }
61
- } else {
62
- hash1 = objectHash ( value1 ) ;
53
+ context . hashCache1 = context . hashCache1 || [ ] ;
54
+ let hash1 = context . hashCache1 [ index1 ] ;
55
+ if ( typeof hash1 === 'undefined' ) {
56
+ context . hashCache1 [ index1 ] = hash1 = objectHash ( value1 , index1 ) ;
63
57
}
64
58
if ( typeof hash1 === 'undefined' ) {
65
59
return false ;
66
60
}
67
- if ( typeof index2 === 'number' ) {
68
- context . hashCache2 = context . hashCache2 || [ ] ;
69
- hash2 = context . hashCache2 [ index2 ] ;
70
- if ( typeof hash2 === 'undefined' ) {
71
- context . hashCache2 [ index2 ] = hash2 = objectHash ( value2 , index2 ) ;
72
- }
73
- } else {
74
- hash2 = objectHash ( value2 ) ;
61
+ context . hashCache2 = context . hashCache2 || [ ] ;
62
+ let hash2 = context . hashCache2 [ index2 ] ;
63
+ if ( typeof hash2 === 'undefined' ) {
64
+ context . hashCache2 [ index2 ] = hash2 = objectHash ( value2 , index2 ) ;
75
65
}
76
66
if ( typeof hash2 === 'undefined' ) {
77
67
return false ;
0 commit comments