File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed
src/platforms/outreach/actions/prospects Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @vesselapi/integrations" ,
3- "version" : " 1.0.33 " ,
3+ "version" : " 1.0.34 " ,
44 "description" : " Vessel integrations" ,
55 "main" : " dist/index.js" ,
66 "module" : " dist/index.mjs" ,
Original file line number Diff line number Diff line change @@ -35,10 +35,14 @@ export default action(
3535 schema : z . object ( {
3636 attributes : z
3737 . preprocess ( ( input ) => {
38- const attributes = attributesSchema . parse ( input ) ;
39- const customFields = customFieldsSchema . parse (
40- omit ( input as any , Object . keys ( attributes ) ) ,
41- ) ;
38+ const attributes = attributesSchema . safeParse ( input ) ;
39+
40+ if ( ! attributes . success ) {
41+ return input ;
42+ }
43+
44+ const customFields = omit ( input as any , Object . keys ( attributes . data ) ) ;
45+
4246 return { customFields, ...attributes } ;
4347 } , attributesSchema . extend ( { customFields : customFieldsSchema } ) )
4448 . transform ( ( attr ) => ( {
Original file line number Diff line number Diff line change @@ -35,10 +35,14 @@ export default action(
3535 id : z . number ( ) ,
3636 attributes : z
3737 . preprocess ( ( input ) => {
38- const attributes = attributesSchema . parse ( input ) ;
39- const customFields = customFieldsSchema . parse (
40- omit ( input as any , Object . keys ( attributes ) ) ,
41- ) ;
38+ const attributes = attributesSchema . safeParse ( input ) ;
39+
40+ if ( ! attributes . success ) {
41+ return input ;
42+ }
43+
44+ const customFields = omit ( input as any , Object . keys ( attributes . data ) ) ;
45+
4246 return { customFields, ...attributes } ;
4347 } , attributesSchema . extend ( { customFields : customFieldsSchema } ) )
4448 . transform ( ( attr ) => ( {
You can’t perform that action at this time.
0 commit comments