File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export class ZodSmartCoercionPlugin<TContext extends Context> implements Standar
3535 options . clientInterceptors . unshift ( ( options ) => {
3636 const inputSchema = options . procedure [ '~orpc' ] . inputSchema
3737
38- if ( ! inputSchema || inputSchema [ '~standard' ] . vendor !== 'zod' ) {
38+ if ( ! inputSchema || inputSchema [ '~standard' ] . vendor !== 'zod' || '_zod' in inputSchema /** < zod4 */ ) {
3939 return options . next ( )
4040 }
4141
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export class experimental_ZodSmartCoercionPlugin<TContext extends Context> imple
3434 options . clientInterceptors . unshift ( ( options ) => {
3535 const inputSchema = options . procedure [ '~orpc' ] . inputSchema
3636
37- if ( ! inputSchema || inputSchema [ '~standard' ] . vendor !== 'zod' ) {
37+ if ( ! inputSchema || inputSchema [ '~standard' ] . vendor !== 'zod' || ! ( '_zod' in inputSchema ) /** >= zod4 */ ) {
3838 return options . next ( )
3939 }
4040
You can’t perform that action at this time.
0 commit comments