Skip to content

Commit

Permalink
Update mockTodos.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Oct 21, 2022
1 parent 615a8ac commit df3a208
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions examples/react/kitchen-sink/src/mockTodos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,7 @@ export async function fetchInvoices() {
export async function fetchInvoiceById(id: number) {
return loaderDelayFn(() =>
ensureInvoices().then(() => {
const invoice = invoices.find((d) => d.id === id)
if (invoice) {
return {
...invoice,
body: `${invoice.body} ${Date.now()}`,
}
}
return invoice
return invoices.find((d) => d.id === id)
}),
)
}
Expand Down

0 comments on commit df3a208

Please sign in to comment.