mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 14:49:07 +00:00
Add validation for start and end date in MetricView to prevent loading without valid dates
This commit is contained in:
parent
a98fc6f784
commit
ae002c0d88
@ -396,6 +396,14 @@ const MetricView: FunctionComponent<ComponentProps> = (
|
||||
async (): Promise<void> => {
|
||||
setIsMetricResultsLoading(true);
|
||||
|
||||
if (
|
||||
!metricViewData.startAndEndDate?.startValue ||
|
||||
!metricViewData.startAndEndDate?.endValue
|
||||
) {
|
||||
setIsMetricResultsLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const results: Array<AggregatedResult> = [];
|
||||
try {
|
||||
for (const queryConfig of metricViewData.queryConfigs) {
|
||||
|
Loading…
Reference in New Issue
Block a user