File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
packages/server/src/utils Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -629,7 +629,33 @@ export const replaceInputsWithConfig = (flowNodeData: INodeData, overrideConfig:
629629 }
630630 }
631631
632- let paramValue = overrideConfig [ config ] ?? inputsObj [ config ]
632+ let paramValue = inputsObj [ config ]
633+ const overrideConfigValue = overrideConfig [ config ]
634+ if ( overrideConfigValue ) {
635+ if ( typeof overrideConfigValue === 'object' ) {
636+ switch ( typeof paramValue ) {
637+ case 'string' :
638+ if ( paramValue . startsWith ( '{' ) && paramValue . endsWith ( '}' ) ) {
639+ try {
640+ paramValue = Object . assign ( { } , JSON . parse ( paramValue ) , overrideConfigValue )
641+ break
642+ } catch ( e ) {
643+ // ignore
644+ }
645+ }
646+ paramValue = overrideConfigValue
647+ break
648+ case 'object' :
649+ paramValue = Object . assign ( { } , paramValue , overrideConfigValue )
650+ break
651+ default :
652+ paramValue = overrideConfigValue
653+ break
654+ }
655+ } else {
656+ paramValue = overrideConfigValue
657+ }
658+ }
633659 // Check if boolean
634660 if ( paramValue === 'true' ) paramValue = true
635661 else if ( paramValue === 'false' ) paramValue = false
You can’t perform that action at this time.
0 commit comments