diff --git a/x-pack/legacy/plugins/infra/public/containers/logs/log_filter/use_log_filter_url_state.tsx b/x-pack/legacy/plugins/infra/public/containers/logs/log_filter/use_log_filter_url_state.tsx index 76eff9e9812c4..f5d4dbea05f7c 100644 --- a/x-pack/legacy/plugins/infra/public/containers/logs/log_filter/use_log_filter_url_state.tsx +++ b/x-pack/legacy/plugins/infra/public/containers/logs/log_filter/use_log_filter_url_state.tsx @@ -32,11 +32,7 @@ export const useLogFilterUrlState = () => { }); /* eslint-disable react-hooks/exhaustive-deps */ - useEffect(() => { - if (logFilterUrlState && filterQueryAsKuery?.expression !== logFilterUrlState.expression) { - applyLogFilterQuery(logFilterUrlState.expression); - } - }, [logFilterUrlState]); + useEffect(() => applyLogFilterQuery(logFilterUrlState.expression), [logFilterUrlState]); useEffect(() => setLogFilterUrlState(filterQueryAsKuery), [filterQueryAsKuery]); /* eslint-enable react-hooks/exhaustive-deps */ };