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:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(medusa): csv parser check `match` prop on column
|
||||||
@@ -146,7 +146,8 @@ class CsvParser<
|
|||||||
tupleKey: string,
|
tupleKey: string,
|
||||||
columnMap: Record<string, TSchema["columns"][number]>
|
columnMap: Record<string, TSchema["columns"][number]>
|
||||||
): TSchema["columns"][number] | undefined {
|
): TSchema["columns"][number] | undefined {
|
||||||
if (columnMap[tupleKey]) {
|
// @ts-ignore
|
||||||
|
if (columnMap[tupleKey] && !columnMap[tupleKey].match) {
|
||||||
return columnMap[tupleKey]
|
return columnMap[tupleKey]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user