From 247b990f8b1bf5ce5bf0be34315ec1dd608b03e1 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Thu, 4 Dec 2025 18:05:07 +0100 Subject: [PATCH] fix(website): only user fasta id in fastaIds Resolves #5627 --- website/src/components/Edit/SequencesForm.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/website/src/components/Edit/SequencesForm.tsx b/website/src/components/Edit/SequencesForm.tsx index b981c4b3dc..334d6bcb7b 100644 --- a/website/src/components/Edit/SequencesForm.tsx +++ b/website/src/components/Edit/SequencesForm.tsx @@ -159,8 +159,13 @@ export class EditableSequences { } getFastaIds(): string { - const filledRows = this.rows.filter((row) => row.value !== null); - return filledRows.map((sequence) => sequence.fastaHeader).join(FASTA_IDS_SEPARATOR); + return this.rows + .flatMap((row) => { + if (row.value === null) return []; + const id = row.fastaHeader?.match(/^\S+/)?.[0]; + return id ? [id] : []; + }) + .join(FASTA_IDS_SEPARATOR); } getSequenceFasta(): File | undefined {