File tree 2 files changed +21
-15
lines changed
2 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ const getContestParticipantsData = async (contest) => {
382
382
console . info (
383
383
`users fetched: ${ i + limit } (${ getPercentage (
384
384
Math . min ( i + limit , failedRanks . length ) ,
385
- total
385
+ failedRanks . length
386
386
) } %)`
387
387
) ;
388
388
}
@@ -433,6 +433,9 @@ const updateUsers = async (job) => {
433
433
const failed = [ ] ;
434
434
let totalSuccess = 0 ;
435
435
const fetchUserHelper = async ( user ) => {
436
+ if ( ! user ) {
437
+ return ;
438
+ }
436
439
const [ data_region , username ] = user . _id . split ( "/" ) ;
437
440
const [ result , err ] = await fetchUserInfo ( username , data_region ) ;
438
441
if ( err ) {
Original file line number Diff line number Diff line change 85
85
86
86
<script src =" https://cdn.jsdelivr.net/npm/simple-datatables@latest" type =" text/javascript" ></script >
87
87
<script >
88
- function localizeDate (page ) {
89
- const startTimes = document .getElementsByClassName (' startTime' )
90
- for (const startTime of startTimes) {
91
- const dateString = startTime .data .trim ()
92
- startTime .textContent = new Date (dateString).toLocaleString ()
88
+ (function () {
89
+ function localizeDate (page ) {
90
+ const startTimes = document .getElementsByClassName (' startTime' )
91
+ for (const startTime of startTimes) {
92
+ const dateString = startTime .data .trim ()
93
+ startTime .textContent = new Date (dateString).toLocaleString ()
94
+ }
93
95
}
94
- }
95
- const dataTable = new simpleDatatables.DataTable (" #contest-table" , {
96
- searchable: true ,
97
- fixedHeight: true ,
98
- sortable: false ,
99
- });
96
+ const dataTable = new simpleDatatables.DataTable (" #contest-table" , {
97
+ searchable: true ,
98
+ fixedHeight: true ,
99
+ sortable: false ,
100
+ });
100
101
101
- localizeDate ()
102
- dataTable .on (' datatable.page' , localizeDate)
103
- </script >
102
+ localizeDate ()
103
+ dataTable .on (' datatable.page' , localizeDate)
104
+ dataTable .on (' datatable.perpage' , localizeDate)
105
+ })()
106
+ </script >
You can’t perform that action at this time.
0 commit comments