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+
14# 1.1.0
25 - added support for shared secrets ([ #5 ] ( https://github.com/dumbasPL/csgo-checker/issues/5 ) )
36 - 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) {
300300 //combine bans and errors
301301 if ( col_name == 'ban' ) {
302302 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 ] ;
305306 } ) ;
306307 }
307308 if ( col_name == 'rank' || col_name == 'rank_dz' || col_name == 'rank_wg' ) {
308309 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 ] ;
311313 } ) ;
312314 }
313315 if ( col_name == 'prime' ) {
314316 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 ] ;
317320 } ) ;
318321 }
319322 if ( new_sort_dir != 'none' ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " csgo-checker" ,
3- "version" : " 1.1.0 " ,
3+ "version" : " 1.1.1 " ,
44 "description" : " csgo-checker" ,
55 "main" : " main.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments