From 3006d4c52d368b369c39b818d373b85c96b90803 Mon Sep 17 00:00:00 2001 From: mismaah Date: Tue, 4 Jun 2024 19:48:42 +0500 Subject: [PATCH] fix: find column match using the label instead of key --- src/steps/MatchColumnsStep/utils/findMatch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/steps/MatchColumnsStep/utils/findMatch.ts b/src/steps/MatchColumnsStep/utils/findMatch.ts index 346f3c41..9fcee775 100644 --- a/src/steps/MatchColumnsStep/utils/findMatch.ts +++ b/src/steps/MatchColumnsStep/utils/findMatch.ts @@ -14,7 +14,7 @@ export const findMatch = ( const smallestValue = fields.reduce>((acc, field) => { const distance = Math.min( ...[ - lavenstein(field.key, header), + lavenstein(field.label, header), ...(field.alternateMatches?.map((alternate) => lavenstein(alternate, header)) || []), ], )