Skip to content

Commit dc8a91f

Browse files
committed
Fix issue with update logs broadcast when the leaderboard is new/empty
1 parent aefe46c commit dc8a91f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

backend/functions/src/schema/models/submission/service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ export class SubmissionService extends PaginatedService {
14631463
? relevantErasUpdateLogPost.isWR.isTie
14641464
: null;
14651465

1466-
const matchingScores = isTie?.matchingScores!;
1466+
const matchingScores = isTie?.matchingScores;
14671467

14681468
discordMessageContents.push({
14691469
content: `<t:${Math.floor(submission.happenedOn)}:D>\n\n${
@@ -1477,7 +1477,7 @@ export class SubmissionService extends PaginatedService {
14771477
)}** by\n\`\`\`yaml\n+ ${relevantErasUpdateLogPost.currentSubmission.characters.join(
14781478
", "
14791479
)}\`\`\`\n🔸 ${
1480-
relevantErasUpdateLogPost.isWR
1480+
relevantErasUpdateLogPost.isWR && matchingScores
14811481
? `as a ${matchingScores}-way tie for`
14821482
: "to"
14831483
} **${

frontend/components/table/special/submissionStatusColumn.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export default {
7878
// this.$emit('submit')
7979
this.$emit('item-updated')
8080
81+
// refresh any submission interfaces
82+
this.$root.$emit('refresh-interface', 'submission')
83+
8184
this.$notifier.showSnackbar({
8285
message: `Submission Status updated`,
8386
variant: 'success',

0 commit comments

Comments
 (0)