@@ -233,22 +233,9 @@ export const initializeOperationDetails = async (
233
233
addTokensAndVariables ( nodeId , type , initData , state , dispatch ) ;
234
234
}
235
235
236
- if ( ! isConnectionRequired ) {
237
- updateDynamicDataInNode (
238
- nodeId ,
239
- isTrigger ,
240
- operationInfo ,
241
- undefined ,
242
- initData . nodeDependencies ,
243
- initData . nodeInputs ,
244
- initData . settings as Settings ,
245
- getAllVariables ( getState ( ) . tokens . variables ) ,
246
- dispatch ,
247
- getState
248
- ) ;
249
- } else if ( connector ) {
236
+ if ( isConnectionRequired ) {
250
237
try {
251
- await trySetDefaultConnectionForNode ( nodeId , connector , dispatch , isConnectionRequired ) ;
238
+ await trySetDefaultConnectionForNode ( nodeId , connector as Connector , dispatch , isConnectionRequired ) ;
252
239
} catch ( e : any ) {
253
240
dispatch (
254
241
updateErrorDetails ( {
@@ -259,12 +246,25 @@ export const initializeOperationDetails = async (
259
246
} ,
260
247
} )
261
248
) ;
262
- dispatch ( setIsPanelLoading ( false ) ) ;
263
249
}
250
+ } else {
251
+ updateDynamicDataInNode (
252
+ nodeId ,
253
+ isTrigger ,
254
+ operationInfo ,
255
+ undefined ,
256
+ initData . nodeDependencies ,
257
+ initData . nodeInputs ,
258
+ initData . settings as Settings ,
259
+ getAllVariables ( getState ( ) . tokens . variables ) ,
260
+ dispatch ,
261
+ getState
262
+ ) ;
264
263
}
265
264
266
- const schemaService = staticResultService . getOperationResultSchema ( connectorId , operationId , swagger || parsedManifest ) ;
267
- schemaService . then ( ( schema ) => {
265
+ dispatch ( setIsPanelLoading ( false ) ) ;
266
+
267
+ staticResultService . getOperationResultSchema ( connectorId , operationId , swagger || parsedManifest ) . then ( ( schema ) => {
268
268
if ( schema ) {
269
269
dispatch ( addResultSchema ( { id : `${ connectorId } -${ operationId } ` , schema : schema } ) ) ;
270
270
}
@@ -279,7 +279,6 @@ export const initializeOperationDetails = async (
279
279
}
280
280
281
281
updateAllUpstreamNodes ( getState ( ) as RootState , dispatch ) ;
282
- dispatch ( setIsPanelLoading ( false ) ) ;
283
282
} ;
284
283
285
284
export const initializeSwitchCaseFromManifest = async ( id : string , manifest : OperationManifest , dispatch : Dispatch ) : Promise < void > => {
0 commit comments