diff --git a/containers/ecr-viewer/src/app/components/Filters.tsx b/containers/ecr-viewer/src/app/components/Filters.tsx index 3e85b6612..143bfa9a1 100644 --- a/containers/ecr-viewer/src/app/components/Filters.tsx +++ b/containers/ecr-viewer/src/app/components/Filters.tsx @@ -256,10 +256,8 @@ const FilterByDate = () => { setFilterDateOption( isProd ? DateRangeOptions.Last24Hours : DateRangeOptions.LastYear, ); - } else { - if (queryDateRange !== filterDateOption) { - setFilterDateOption(queryDateRange); - } + } else if (queryDateRange !== filterDateOption) { + setFilterDateOption(queryDateRange); } };