diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts index ec3eb8267b6a4..8a07704e39910 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts @@ -322,7 +322,7 @@ export const getJobConfigFromFormState = ( return jobConfig; }; -function getCamelCase(property: string): string { +function toCamelCase(property: string): string { const camelCased = property.replace(/_([a-z])/g, function (g) { return g[1].toUpperCase(); }); @@ -357,7 +357,7 @@ export function getCloneFormStateFromJobConfig( for (const key in analysisConfig) { if (analysisConfig.hasOwnProperty(key)) { - const camelCased = getCamelCase(key); + const camelCased = toCamelCase(key); // @ts-ignore resultState[camelCased] = analysisConfig[key]; }