Skip to content

Commit

Permalink
style(elocamp): improve code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
p2r3 committed Oct 17, 2024
1 parent 408745f commit f802195
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions util/weeklog.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ function parseLog (buffer, categoryList, forcePurge = false) {
if (entry.time === 0) {

// the portal count byte denotes whether to purge the run from the output entirely
if (!forcePurge && entry.portals === 0) continue;
const purge = entry.portals === 0;
// if we're not purging, just ignore this marker and do nothing
if (!forcePurge && !purge) continue;

for (let j = log.length - 1; j >= 0; j --) {
// look for the last run by the same user in the same category and remove it
Expand All @@ -63,10 +65,11 @@ function parseLog (buffer, categoryList, forcePurge = false) {
}
}

continue;
}
} else {

log.push(entry);

log.push(entry);
}

}

Expand Down

0 comments on commit f802195

Please sign in to comment.