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ć
2023-08-31 11:38:52 +02:00
committed by GitHub
parent d57895bff1
commit 4bf8acbdd4
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix(medusa): csv parser check `match` prop on column

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]
}