Skip to content

Commit

Permalink
update equality check in helper
Browse files Browse the repository at this point in the history
  • Loading branch information
yctercero committed Jan 12, 2024
1 parent db3c3d5 commit d1db770
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { SavedObjectReference } from '@kbn/core/server';
import { InvestigationFields } from '@kbn/security-solution-plugin/common/api/detection_engine';
import { Rule } from '@kbn/alerting-plugin/common';
import { BaseRuleParams } from '@kbn/security-solution-plugin/server/lib/detection_engine/rule_schema';
import { isEqual } from 'lodash/fp';
import { getRuleSOById } from './get_rule_so_by_id';

interface RuleSO {
Expand All @@ -30,8 +31,8 @@ export const checkInvestigationFieldSoValue = async (
},
} = await getRuleSOById(es, ruleId);

return rule?.alert.params.investigationFields === expectedSoValue;
return isEqual(rule?.alert.params.investigationFields, expectedSoValue);
}

return ruleSO?.alert.params.investigationFields === expectedSoValue;
return isEqual(ruleSO?.alert.params.investigationFields, expectedSoValue);
};

0 comments on commit d1db770

Please sign in to comment.