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.
2 parents 876ec71 + eeb9523 commit 0186de5Copy full SHA for 0186de5
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