From 5c2f1755e6726b02248769849db77f33c976fad6 Mon Sep 17 00:00:00 2001 From: popcorny Date: Mon, 14 Aug 2023 16:11:21 +0800 Subject: [PATCH] Dont cshow change icon if one side is not profiled Signed-off-by: popcorny --- static_report/src/utils/dbt.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/static_report/src/utils/dbt.ts b/static_report/src/utils/dbt.ts index 7c46c85de..44b005f17 100644 --- a/static_report/src/utils/dbt.ts +++ b/static_report/src/utils/dbt.ts @@ -190,16 +190,18 @@ export function compareColumn( } // value change - if (base?.nulls !== target?.nulls) { - return 'col_changed'; - } + if (base?.nulls !== undefined && target?.nulls !== undefined) { + if (base?.nulls !== target?.nulls) { + return 'col_changed'; + } - if (base?.distinct !== target?.distinct) { - return 'col_changed'; - } + if (base?.distinct !== target?.distinct) { + return 'col_changed'; + } - if (base?.duplicates !== target?.duplicates) { - return 'col_changed'; + if (base?.duplicates !== target?.duplicates) { + return 'col_changed'; + } } }