fix(editor): Handle drag-n-dropping from other nodes in assignment component (#8661)

This commit is contained in:
Elias Meire
2024-02-20 11:21:10 +01:00
committed by GitHub
parent 3279762221
commit c943a51a28
2 changed files with 19 additions and 1 deletions

View File

@@ -4,7 +4,10 @@ import { resolveParameter } from '@/composables/useWorkflowHelpers';
import { v4 as uuid } from 'uuid';
export function nameFromExpression(expression: string): string {
return expression.replace(/^{{\s*|\s*}}$/g, '').replace('$json.', '');
return expression
.replace(/^{{\s*|\s*}}$/g, '')
.replace('$json.', '')
.replace(/^\$\(.*\)(\.item\.json)?\.(.*)/, '$2');
}
export function inferAssignmentType(value: unknown): string {