Transformations: Prevent FilterByValue transform crashing panel edit (#34747)

This commit is contained in:
Jack Westbrook
2021-05-26 17:30:34 +02:00
committed by GitHub
parent d69c21acb6
commit 515c73d8e6

View File

@@ -21,7 +21,7 @@ export const FilterByValueFilterEditor: React.FC<Props> = (props) => {
const { fieldsAsOptions, fieldByDisplayName } = fieldsInfo;
const fieldName = getFieldName(filter, fieldsAsOptions) ?? '';
const field = fieldByDisplayName[fieldName];
const matcherOptions = getMatcherOptions(field);
const matcherOptions = field ? getMatcherOptions(field) : [];
const matcherId = getSelectedMatcherId(filter, matcherOptions);
const editor = valueMatchersUI.getIfExists(matcherId);