Skip to content

Commit

Permalink
Fix bug that coerced empty scaled float value to 0 (#62251) (#62536)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
cjcenizal and elasticmachine authored Apr 4, 2020
1 parent 9e2d093 commit c19e0da
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 c19e0da

Please sign in to comment.