Skip to content

Commit

Permalink
Fix bug that coerced empty scaled float value to 0 (#62251) (#62537)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal authored Apr 4, 2020
1 parent b291b8b commit 3f7704f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 3f7704f

Please sign in to comment.