From 261a8fdefb7001606ac21f09db64d229230e02bf Mon Sep 17 00:00:00 2001 From: Fine Date: Thu, 13 Oct 2022 10:28:07 +0800 Subject: [PATCH] fix --- src/hooks/useAssociateProcessor.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/hooks/useAssociateProcessor.ts b/src/hooks/useAssociateProcessor.ts index cc3554cb..4de523d1 100644 --- a/src/hooks/useAssociateProcessor.ts +++ b/src/hooks/useAssociateProcessor.ts @@ -66,14 +66,16 @@ export default function associateProcessor() { function traceFilters(currentParams: any) { const appStore = useAppStoreWithOut(); - if (!currentParams.value) { + if (!currentParams) { return; } - const start = appStore.intervalUnix[currentParams.value.dataIndex]; - const end = start; + const start = appStore.intervalUnix[currentParams.dataIndex]; const { step } = appStore.durationRow; - const item = { - duration: { + let duration = undefined; + + if (start) { + const end = start; + duration = { start: dateFormatStep( getLocalTime(appStore.utc, new Date(start)), step, @@ -85,7 +87,11 @@ export default function associateProcessor() { true ), step, - }, + }; + } + + const item = { + duration, }; return item; }