mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-27 10:20:39 +01:00
eslint fixes
This commit is contained in:
@@ -5,19 +5,19 @@ import type { Context } from './context'
|
||||
|
||||
const t = initTRPC.context<Context>().create({
|
||||
transformer: superjson,
|
||||
errorFormatter({ shape, error }) {
|
||||
errorFormatter ({ shape, error }) {
|
||||
return {
|
||||
...shape,
|
||||
data: {
|
||||
...shape.data,
|
||||
zodError:
|
||||
error.code === 'BAD_REQUEST'
|
||||
&& error.cause instanceof ZodError
|
||||
error.code === 'BAD_REQUEST' &&
|
||||
error.cause instanceof ZodError
|
||||
? error.cause!.flatten()
|
||||
: null,
|
||||
},
|
||||
: null
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user