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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);