fix(editor): Trim whitespace from workflow owner name (#21483)

This commit is contained in:
Csaba Tuncsik 2025-11-19 12:15:08 +02:00 committed by GitHub
parent 33bc272656
commit 0dca2b0f12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,7 +22,12 @@ export const useWorkflowsEEStore = defineStore(STORES.WORKFLOWS_EE, () => {
): string => {
const workflow = workflowStore.getWorkflowById(workflowId);
const { name, email } = splitName(workflow?.homeProject?.name ?? '');
return name ? (email ? `${name} (${email})` : name) : (email ?? fallback);
const trimmedName = name?.replace(/\s+/g, ' ')?.trim();
return trimmedName
? email
? `${trimmedName} (${email})`
: trimmedName
: (email ?? fallback);
};
});