mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(editor): Format action names properly when action is not defined (#11030)
This commit is contained in:
@@ -19,6 +19,7 @@ import { sublimeSearch } from '@/utils/sortUtils';
|
||||
import type { NodeViewItemSection } from './viewsData';
|
||||
import { i18n } from '@/plugins/i18n';
|
||||
import { sortBy } from 'lodash-es';
|
||||
import * as changeCase from 'change-case';
|
||||
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
|
||||
@@ -177,3 +178,11 @@ export function groupItemsInSections(
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
export const formatTriggerActionName = (actionPropertyName: string) => {
|
||||
let name = actionPropertyName;
|
||||
if (actionPropertyName.includes('.')) {
|
||||
name = actionPropertyName.split('.').join(' ');
|
||||
}
|
||||
return changeCase.noCase(name);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user