From 0a510809aa0724ca34f4e4410e61f07c2bc05d14 Mon Sep 17 00:00:00 2001 From: nreese Date: Wed, 15 Feb 2023 19:42:50 -0700 Subject: [PATCH] tslint --- packages/kbn-es-query/src/filters/helpers/only_disabled.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/kbn-es-query/src/filters/helpers/only_disabled.ts b/packages/kbn-es-query/src/filters/helpers/only_disabled.ts index 344459f15fac1..5a9ca76646eb4 100644 --- a/packages/kbn-es-query/src/filters/helpers/only_disabled.ts +++ b/packages/kbn-es-query/src/filters/helpers/only_disabled.ts @@ -8,6 +8,7 @@ import { filter } from 'lodash'; import type { Filter } from '..'; +import type { FilterCompareOptions } from './compare_filters'; import { compareFilters, COMPARE_ALL_OPTIONS } from './compare_filters'; const isEnabled = (f: Filter) => f && f.meta && !f.meta.disabled; @@ -21,11 +22,12 @@ const isEnabled = (f: Filter) => f && f.meta && !f.meta.disabled; export const onlyDisabledFiltersChanged = ( newFilters?: Filter[], oldFilters?: Filter[], - comparatorOptions?: FilterCompareOptions = COMPARE_ALL_OPTIONS + comparatorOptions?: FilterCompareOptions ) => { // If it's the same - compare only enabled filters const newEnabledFilters = filter(newFilters || [], isEnabled); const oldEnabledFilters = filter(oldFilters || [], isEnabled); + const options = comparatorOptions ?? COMPARE_ALL_OPTIONS; - return compareFilters(oldEnabledFilters, newEnabledFilters, comparatorOptions); + return compareFilters(oldEnabledFilters, newEnabledFilters, options); };