Skip to content

Commit

Permalink
fix: make the normal (non-advanced) lineage search case-insensitive (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoran-chen authored Nov 26, 2024
1 parent 0866079 commit 6961fce
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/VariantSearchField.tsx
Original file line number Diff line number Diff line change
@@ -122,9 +122,9 @@ function optionsToVariantSelector(options: SearchOption[]): VariantSelector {
} else if (type === 'nuc-insertion') {
selector.nucInsertions!.push(value);
} else if (type === 'pango-lineage') {
selector.pangoLineage = value;
selector.pangoLineage = value.toUpperCase();
} else if (type === 'nextclade-pango-lineage') {
selector.nextcladePangoLineage = value;
selector.nextcladePangoLineage = value.toUpperCase();
} else if (type === 'nextstrain-clade') {
selector.nextstrainClade = value;
}
8 changes: 4 additions & 4 deletions src/data/VariantSelector.ts
Original file line number Diff line number Diff line change
@@ -121,8 +121,8 @@ export function readVariantListFromUrlSearchParams(params: URLSearchParams): Var
// Create the variant selectors.
const variants: VariantSelector[] = [
{
pangoLineage: params.get('pangoLineage') ?? undefined,
nextcladePangoLineage: params.get('nextcladePangoLineage') ?? undefined,
pangoLineage: params.get('pangoLineage')?.toUpperCase() ?? undefined,
nextcladePangoLineage: params.get('nextcladePangoLineage')?.toUpperCase() ?? undefined,
gisaidClade: params.get('gisaidClade') ?? undefined,
nextstrainClade: params.get('nextstrainClade') ?? undefined,
aaMutations: params.get('aaMutations')?.split(','),
@@ -134,8 +134,8 @@ export function readVariantListFromUrlSearchParams(params: URLSearchParams): Var
];
for (let id of variantIds) {
variants.push({
pangoLineage: params.get('pangoLineage' + id) ?? undefined,
nextcladePangoLineage: params.get('nextcladePangoLineage' + id) ?? undefined,
pangoLineage: params.get('pangoLineage' + id)?.toUpperCase() ?? undefined,
nextcladePangoLineage: params.get('nextcladePangoLineage' + id)?.toUpperCase() ?? undefined,
gisaidClade: params.get('gisaidClade' + id) ?? undefined,
nextstrainClade: params.get('nextstrainClade' + id) ?? undefined,
aaMutations: params.get('aaMutations' + id)?.split(','),

0 comments on commit 6961fce

Please sign in to comment.