We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 010062b commit eeb9523Copy full SHA for eeb9523
src/steps/MatchColumnsStep/utils/findMatch.ts
@@ -18,7 +18,9 @@ export const findMatch = <T extends string>(
18
...(field.alternateMatches?.map((alternate) => lavenstein(alternate, header)) || []),
19
],
20
)
21
- return distance < acc.distance || !acc.distance ? ({ value: field.key, distance } as AutoMatchAccumulator<T>) : acc
+ return distance < acc.distance || acc.distance === undefined
22
+ ? ({ value: field.key, distance } as AutoMatchAccumulator<T>)
23
+ : acc
24
}, {} as AutoMatchAccumulator<T>)
25
return smallestValue.distance <= autoMapDistance ? smallestValue.value : undefined
26
}
0 commit comments