Skip to content

Commit

Permalink
Merge pull request #1252 from Shelf-nu/1217-bug-issue-with-multiline-…
Browse files Browse the repository at this point in the history
…text

fix: wrong parsing of field definition on import
  • Loading branch information
DonKoko authored Aug 15, 2024
2 parents c71d49b + 85e5770 commit 2b3f3df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/utils/custom-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ export const getDefinitionFromCsvHeader = (
let type =
defArr.find((e) => e.toLowerCase().startsWith("type:"))?.substring(5) ||
"text"; //"text"
type = type.replace(/\s+/g, "").toUpperCase();

type = type.trim().replace(/\s+/g, "_").toUpperCase();
return {
name,
active: true,
Expand Down

0 comments on commit 2b3f3df

Please sign in to comment.