File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/pages/instance/Chatwoot Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ import { Chatwoot as ChatwootType } from "@/types/evolution.types";
2424const stringOrUndefined = z
2525 . string ( )
2626 . optional ( )
27- . transform ( ( value ) => ( value === "" ? undefined : value ) ) ;
27+ . transform ( ( value ) => {
28+ const trimmed = value ?. trim ( ) ;
29+ return ! trimmed || trimmed === "" ? undefined : trimmed ;
30+ } ) ;
2831
2932const formSchema = z . object ( {
3033 enabled : z . boolean ( ) ,
@@ -117,7 +120,7 @@ function Chatwoot() {
117120 token : data . token ,
118121 url : data . url ,
119122 signMsg : data . signMsg || false ,
120- signDelimiter : data . signDelimiter || "\\n" ,
123+ signDelimiter : data . signDelimiter ?. trim ( ) || "\\n" ,
121124 nameInbox : data . nameInbox || "" ,
122125 organization : data . organization || "" ,
123126 logo : data . logo || "" ,
You can’t perform that action at this time.
0 commit comments