Skip to content

Commit 708c9a6

Browse files
authored
fix(_official-contacts-tutorial): Return updated contact from updateContact() (#507)
1 parent f0b8d0a commit 708c9a6

File tree

1 file changed

+1
-2
lines changed
  • _official-contacts-tutorial/app

1 file changed

+1
-2
lines changed

_official-contacts-tutorial/app/data.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ export async function updateContact(id: string, updates: ContactMutation) {
8787
if (!contact) {
8888
throw new Error(`No contact found for ${id}`);
8989
}
90-
await fakeContacts.set(id, { ...contact, ...updates });
91-
return contact;
90+
return fakeContacts.set(id, { ...contact, ...updates });
9291
}
9392

9493
export async function deleteContact(id: string) {

0 commit comments

Comments
 (0)