Skip to content

Commit

Permalink
remove default value from req with a serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
sabarasaba committed May 26, 2021
1 parent 2fe5ee1 commit b017045
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { setup, SetupResult, getProcessorValue } from './processor.helpers';
const defaultFingerprintParameters = {
if: undefined,
tag: undefined,
method: 'SHA-1',
method: undefined,
salt: undefined,
description: undefined,
ignore_missing: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ const fieldsConfig: FieldsConfig = {
),
},
method: {
type: FIELD_TYPES.TEXT,
type: FIELD_TYPES.SELECT,
defaultValue: 'SHA-1',
serializer: from.emptyStringToUndefined,
serializer: (v) => (v === 'SHA-1' || v === '' ? undefined : v),
label: i18n.translate('xpack.ingestPipelines.pipelineEditor.fingerprint.methodFieldLabel', {
defaultMessage: 'Method',
}),
Expand Down

0 comments on commit b017045

Please sign in to comment.