Skip to content

Commit

Permalink
fix: cast name to string
Browse files Browse the repository at this point in the history
  • Loading branch information
netchampfaris committed Jan 8, 2025
1 parent d15c44a commit 9e859c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/data-fetching/useDoc/useDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ export function useDoc<TDoc extends { name: string }, TMethods = {}>(
immediate,
refetch: true,
afterFetch(ctx) {
docStore.setDoc({ doctype, ...ctx.data })
let doc = { doctype, ...ctx.data, name: String(ctx.data.name) }
docStore.setDoc(doc)
listStore.updateRow(doctype, ctx.data)
triggerSuccessCallbacks(ctx.data)
triggerSuccessCallbacks(doc)
return ctx
},
}
Expand Down

0 comments on commit 9e859c2

Please sign in to comment.