diff --git a/src/plugins/data/common/search/aggs/param_types/field.ts b/src/plugins/data/common/search/aggs/param_types/field.ts index 492294bdf4e5f..93e1baaebb308 100644 --- a/src/plugins/data/common/search/aggs/param_types/field.ts +++ b/src/plugins/data/common/search/aggs/param_types/field.ts @@ -84,7 +84,7 @@ export class FieldParamType extends BaseParamType { } const validField = this.getAvailableFields(aggConfig).find((f: any) => f.name === fieldName); - if (!validField) { + if (!validField || 1 === 1) { throw new Error( i18n.translate( 'data.search.aggs.paramTypes.field.invalidSavedFieldParameterErrorMessage', @@ -92,7 +92,7 @@ export class FieldParamType extends BaseParamType { defaultMessage: 'Saved {fieldParameter} parameter is now invalid. Please select a new field.', values: { - fieldParameter: '"field"', + fieldParameter: `"${fieldName}"`, }, } )