Skip to content

Commit 73e6a1d

Browse files
committed
Rename option to record
1 parent 4e1a12d commit 73e6a1d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/steps/MatchColumnsStep/utils/setColumn.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ export const setColumn = <T extends string>(
1010
): Column<T> => {
1111
switch (field?.fieldType.type) {
1212
case "select":
13-
const options = field.fieldType.options
13+
const fieldOptions = field.fieldType.options
1414
const uniqueData = uniqueEntries(data || [], oldColumn.index) as MatchedOptions<T>[]
1515
const matchedOptions = autoMapSelectValues
16-
? uniqueData.map((option) => {
17-
const value = options.find(
18-
(fieldOption) => fieldOption.value === option.entry || fieldOption.label === option.entry,
16+
? uniqueData.map((record) => {
17+
const value = fieldOptions.find(
18+
(fieldOption) => fieldOption.value === record.entry || fieldOption.label === record.entry,
1919
)?.value
20-
return value ? ({ ...option, value } as MatchedOptions<T>) : (option as MatchedOptions<T>)
20+
return value ? ({ ...record, value } as MatchedOptions<T>) : (record as MatchedOptions<T>)
2121
})
2222
: uniqueData
2323
const allMatched = matchedOptions.filter((o) => o.value).length == uniqueData?.length

0 commit comments

Comments
 (0)