Skip to content

Commit

Permalink
Fix: -regex is _not_ supported, guard against undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed Aug 21, 2024
1 parent 70f9653 commit 4f23306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/src/utils/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const getLapisSearchParameters = (
Object.entries(fieldValues).filter(([, value]) => value !== undefined && value !== ''),
);
for (const field of expandedSchema) {
if (field.type === 'authors') {
if (field.type === 'authors' && sequenceFilters[field.name] !== undefined) {
sequenceFilters[field.name.concat('$regex')] = sequenceFilters[field.name];
delete sequenceFilters[field.name];
}
Expand Down

0 comments on commit 4f23306

Please sign in to comment.