Skip to content

Commit

Permalink
fix: if no replace to carriage return
Browse files Browse the repository at this point in the history
  • Loading branch information
Pipazoul committed Nov 20, 2023
1 parent 4be3ed1 commit 94a7cfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
const itemLines = await parseCSV(url +'/items.csv');
let categories = catLines.map(([category_label, category_index]) => ({
category_index: category_index.replace('\r', ''), // Remove the carriage return "\r
category_index: category_index?.replace('\r', ''), // Remove the carriage return "\r
category_label,
checked: true,
items: itemLines
.filter(([pictogram_label, pictogram_file, pictogram_category]) =>
pictogram_category?.split(';').find((cat) => cat === category_index.replace('\r', ''))
pictogram_category?.split(';').find((cat) => cat === category_index?.replace('\r', ''))
)
.map(([pictogram_label, pictogram_file, pictogram_category]) => ({
pictogram_file,
Expand Down

0 comments on commit 94a7cfb

Please sign in to comment.