From 05a1c4816e512bc52269a5c7d9afabf8dc6956b8 Mon Sep 17 00:00:00 2001 From: Simon Ma Date: Mon, 18 Dec 2023 15:58:32 +0800 Subject: [PATCH] fix(ava/insight): fix the infinite loop issue when recommendation hitting both Integer and Date types --- packages/ava/src/data/analysis/field/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ava/src/data/analysis/field/index.ts b/packages/ava/src/data/analysis/field/index.ts index e2a53674..1fec26ae 100644 --- a/packages/ava/src/data/analysis/field/index.ts +++ b/packages/ava/src/data/analysis/field/index.ts @@ -319,7 +319,7 @@ export function analyzeField( restNotNullArray = restNotNullArray.filter((item) => !isDateString(item)); } else if (item === 'integer') { meta.integer = analyzeField( - restNotNullArray.filter((item) => isIntegerString(item)), + restNotNullArray.filter((item) => isIntegerString(item) && !isDateString(item)), strictDatePattern ) as NumberFieldInfo; restNotNullArray = restNotNullArray.filter((item) => !isIntegerString(item));