fix: timerange in filter box error (#14890)

This commit is contained in:
Yongjie Zhao 2021-05-28 04:28:58 +01:00 committed by GitHub
parent 2313e3ef4f
commit acbbced20b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -158,6 +158,8 @@ class FilterBox extends React.PureComponent {
if (options !== null) {
if (Array.isArray(options)) {
vals = options.map(opt => (typeof opt === 'string' ? opt : opt.value));
} else if (Object.values(TIME_FILTER_MAP).includes(fltr)) {
vals = options.value ?? options;
} else {
// must use array member for legacy extra_filters's value
vals = ensureIsArray(options.value ?? options);