Skip to content

Commit

Permalink
fix(_official-contacts-tutorial): Return updated contact from `update…
Browse files Browse the repository at this point in the history
…Contact()` (#507)
  • Loading branch information
sahilmulla committed Jun 16, 2024
1 parent f0b8d0a commit 708c9a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions _official-contacts-tutorial/app/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ export async function updateContact(id: string, updates: ContactMutation) {
if (!contact) {
throw new Error(`No contact found for ${id}`);
}
await fakeContacts.set(id, { ...contact, ...updates });
return contact;
return fakeContacts.set(id, { ...contact, ...updates });
}

export async function deleteContact(id: string) {
Expand Down

0 comments on commit 708c9a6

Please sign in to comment.