Skip to content

Commit

Permalink
Because onThreshold is changed even when it hasn't changed add a check (
Browse files Browse the repository at this point in the history
#63555) (#63567)

* Because onThreshold is changed even when it hasn't changed add a check

* Fix join

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
phillipb and elasticmachine committed Apr 15, 2020
1 parent 0bb117d commit 7b9fb1b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ export const ExpressionRow: React.FC<ExpressionRowProps> = props => {

const updateThreshold = useCallback(
t => {
setAlertParams(expressionId, { ...expression, threshold: t });
if (t.join() !== expression.threshold.join()) {
setAlertParams(expressionId, { ...expression, threshold: t });
}
},
[expressionId, expression, setAlertParams]
);
Expand Down

0 comments on commit 7b9fb1b

Please sign in to comment.