File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,23 +158,25 @@ export function OAuthModal(props: OAuthModalProps) {
158158 setError ( null )
159159
160160 try {
161+ const trimmedName = isConnect ? displayName . trim ( ) : ''
161162 if ( isConnect ) {
162- const trimmedName = displayName . trim ( )
163163 if ( ! trimmedName ) {
164164 setError ( 'Display name is required.' )
165165 return
166166 }
167+ }
167168
168- if ( shouldPreflightOAuthProvider ( providerId ) ) {
169- const providerConfig = await requestJson ( getOAuthProviderConfigContract , {
170- query : { providerId } ,
171- } )
172- if ( ! providerConfig . available ) {
173- setError ( providerConfig . message )
174- return
175- }
169+ if ( shouldPreflightOAuthProvider ( providerId ) ) {
170+ const providerConfig = await requestJson ( getOAuthProviderConfigContract , {
171+ query : { providerId } ,
172+ } )
173+ if ( ! providerConfig . available ) {
174+ setError ( providerConfig . message )
175+ return
176176 }
177+ }
177178
179+ if ( isConnect ) {
178180 await createDraft . mutateAsync ( {
179181 workspaceId,
180182 providerId,
You can’t perform that action at this time.
0 commit comments