File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -27,18 +27,18 @@ function array_count_values(array) {
27
27
return t ;
28
28
} ;
29
29
30
- var __countValue = function ( value ) {
30
+ var __countValue = function ( tmp_arr , value ) {
31
31
switch ( typeof value ) {
32
32
case 'number' :
33
33
if ( Math . floor ( value ) !== value ) {
34
34
return ;
35
35
}
36
36
// Fall-through
37
37
case 'string' :
38
- if ( value in this && this . hasOwnProperty ( value ) ) {
39
- ++ this [ value ] ;
38
+ if ( value in tmp_arr && tmp_arr . hasOwnProperty ( value ) ) {
39
+ ++ tmp_arr [ value ] ;
40
40
} else {
41
- this [ value ] = 1 ;
41
+ tmp_arr [ value ] = 1 ;
42
42
}
43
43
}
44
44
} ;
@@ -47,7 +47,7 @@ function array_count_values(array) {
47
47
if ( t === 'array' ) {
48
48
for ( key in array ) {
49
49
if ( array . hasOwnProperty ( key ) ) {
50
- __countValue . call ( tmp_arr , array [ key ] ) ;
50
+ __countValue . call ( this , tmp_arr , array [ key ] ) ;
51
51
}
52
52
}
53
53
}
Original file line number Diff line number Diff line change 1
1
array_change_key_case#7
2
- array_count_values#1
3
- array_count_values#2
4
2
array_diff_uassoc#1
5
3
array_merge_recursive#1
6
4
array_splice#1
You can’t perform that action at this time.
0 commit comments