File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change
1
+ # 1.1.1
2
+ - fixed sorting algorithm causing changes to account data
3
+
1
4
# 1.1.0
2
5
- added support for shared secrets ([ #5 ] ( https://github.com/dumbasPL/csgo-checker/issues/5 ) )
3
6
- added new cooldown reason ` Reports (Grief) `
Original file line number Diff line number Diff line change @@ -300,20 +300,23 @@ function handleSort(elem, increment = true) {
300
300
//combine bans and errors
301
301
if ( col_name == 'ban' ) {
302
302
accounts = accounts . map ( a => {
303
- a [ 1 ] . ban = a [ 1 ] . error ?? formatPenalty ( a [ 1 ] . penalty_reason ?? '?' , a [ 1 ] . penalty_seconds ?? - 1 ) ;
304
- return a ;
303
+ let clone = Object . assign ( { } , a [ 1 ] ) ;
304
+ clone . ban = clone . error ?? formatPenalty ( clone . penalty_reason ?? '?' , clone . penalty_seconds ?? - 1 ) ;
305
+ return [ a [ 0 ] , clone ] ;
305
306
} ) ;
306
307
}
307
308
if ( col_name == 'rank' || col_name == 'rank_dz' || col_name == 'rank_wg' ) {
308
309
accounts = accounts . map ( a => {
309
- a [ 1 ] [ col_name ] = Math . max ( a [ 1 ] [ col_name ] , 0 ) ; //clap -1 to 0 so sorting works correctly
310
- return a ;
310
+ let clone = Object . assign ( { } , a [ 1 ] ) ;
311
+ clone [ col_name ] = Math . max ( clone [ col_name ] , 0 ) ; //clap -1 to 0 so sorting works correctly
312
+ return [ a [ 0 ] , clone ] ;
311
313
} ) ;
312
314
}
313
315
if ( col_name == 'prime' ) {
314
316
accounts = accounts . map ( a => {
315
- a [ 1 ] . prime = a [ 1 ] . prime ? 1 : 0 ; //convert to integer
316
- return a ;
317
+ let clone = Object . assign ( { } , a [ 1 ] ) ;
318
+ clone . prime = clone . prime ? 1 : 0 ; //convert to integer
319
+ return [ a [ 0 ] , clone ] ;
317
320
} ) ;
318
321
}
319
322
if ( new_sort_dir != 'none' ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " csgo-checker" ,
3
- "version" : " 1.1.0 " ,
3
+ "version" : " 1.1.1 " ,
4
4
"description" : " csgo-checker" ,
5
5
"main" : " main.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments