fix(editor): Improve dragndrop of input pills with spaces (#9656)

This commit is contained in:
Elias Meire
2024-06-07 15:37:30 +02:00
committed by GitHub
parent bb7227d18d
commit 291d46af15
5 changed files with 124 additions and 48 deletions

View File

@@ -3,13 +3,6 @@ import type { AssignmentValue, IDataObject } from 'n8n-workflow';
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.', '')
.replace(/^\$\(.*\)(\.item\.json)?\.(.*)/, '$2');
}
export function inferAssignmentType(value: unknown): string {
if (typeof value === 'boolean') return 'boolean';
if (typeof value === 'number') return 'number';