mirror of
https://github.com/n8n-io/n8n.git
synced 2025-11-20 17:46:34 +00:00
fix(editor): Trim whitespace from workflow owner name (#21483)
This commit is contained in:
parent
33bc272656
commit
0dca2b0f12
@ -22,7 +22,12 @@ export const useWorkflowsEEStore = defineStore(STORES.WORKFLOWS_EE, () => {
|
|||||||
): string => {
|
): string => {
|
||||||
const workflow = workflowStore.getWorkflowById(workflowId);
|
const workflow = workflowStore.getWorkflowById(workflowId);
|
||||||
const { name, email } = splitName(workflow?.homeProject?.name ?? '');
|
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);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user