Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
craigkai committed Jan 24, 2024
1 parent d933ab1 commit 1e7f17b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/matches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ export class Matches implements Writable<Matches> {
}>
): Promise<void> {
const old = payload.old as MatchRow;
const udpated = payload.new as MatchRow;
const updated = payload.new as MatchRow;

const matchIndex = self.matches?.findIndex((m: MatchRow) => m.id === old.id);
if (matchIndex !== undefined && matchIndex !== -1) {
udpated.matches_team1_fkey = self.matches[matchIndex].matches_team1_fkey;
udpated.matches_team2_fkey = self.matches[matchIndex].matches_team2_fkey;
udpated.matches_ref_fkey = self.matches[matchIndex].matches_ref_fkey;
updated.matches_team1_fkey = self.matches[matchIndex].matches_team1_fkey;
updated.matches_team2_fkey = self.matches[matchIndex].matches_team2_fkey;
updated.matches_ref_fkey = self.matches[matchIndex].matches_ref_fkey;

self.matches?.splice(matchIndex, 1, udpated as MatchRow);
self.matches?.splice(matchIndex, 1, updated as MatchRow);
const matches = self.matches;

self._update((that: Matches) => {
Expand Down

1 comment on commit 1e7f17b

@vercel
Copy link

@vercel vercel bot commented on 1e7f17b Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

volleyman – ./

volleyman-git-main-craigkai.vercel.app
volleyman-craigkai.vercel.app
volleyman.vercel.app

Please sign in to comment.