fix(editor): Format action names properly when action is not defined (#11030)

This commit is contained in:
Ricardo Espinoza
2024-10-02 08:16:33 -04:00
committed by GitHub
parent 74fa259b37
commit 9c43fb301d
6 changed files with 197 additions and 118 deletions

View File

@@ -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);
};