From c19e0dae78cf1e1289df7f519da853474919354f Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Sat, 4 Apr 2020 13:57:31 -0700 Subject: [PATCH] Fix bug that coerced empty scaled float value to 0 (#62251) (#62536) Co-authored-by: Elastic Machine --- .../mappings_editor/constants/parameters_definition.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/constants/parameters_definition.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/constants/parameters_definition.tsx index 732449f382f93..1b9372e4b50c4 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/constants/parameters_definition.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/constants/parameters_definition.tsx @@ -504,7 +504,7 @@ export const PARAMETERS_DEFINITION: { [key in ParameterName]: ParameterDefinitio fieldConfig: { defaultValue: '', type: FIELD_TYPES.NUMBER, - deserializer: (value: string | number) => +value, + deserializer: (value: string | number) => (value === '' ? value : +value), formatters: [toInt], label: i18n.translate('xpack.idxMgmt.mappingsEditor.parameters.scalingFactorLabel', { defaultMessage: 'Scaling factor',