Skip to content

Commit

Permalink
Fix bug that coerced empty scaled float value to 0 (elastic#62251)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Apr 4, 2020
1 parent a64de84 commit 8f4388e
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 8f4388e

Please sign in to comment.