fix(medusa): csv parser check match prop on column (#4913)

**What**
- if there is the `match` column with regex defined in the schema don't look up column definition by name
This commit is contained in:
Frane Polić authored and GitHub committed 2023-08-31 09:38:52 +00:00
1 parent d57895bff1
commit 4bf8acbdd4
2 files changed
+7 -1

No files matched your search

+2 -1
View File
@@ -146,7 +146,8 @@ class CsvParser<
tupleKey: string,
columnMap: Record<string, TSchema["columns"][number]>
): TSchema["columns"][number] | undefined {
if (columnMap[tupleKey]) {
// @ts-ignore
if (columnMap[tupleKey] && !columnMap[tupleKey].match) {
return columnMap[tupleKey]
}