Skip to content

Commit

Permalink
Remove unnecessary intermediate variable
Browse files Browse the repository at this point in the history
Setting the nested dictionary value directly is more readable.
  • Loading branch information
victorlin committed Jan 10, 2025
1 parent cd107e3 commit a4bbe35
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/util/entropyCreateStateFromJsons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ export const genomeMap = (annotations: JsonAnnotations): Chromosome[] => {
.map(([annotationKey, annotation]) => {
const geneName = annotation.gene || annotationKey;
if (!(geneName in annotationsPerGene)) annotationsPerGene[geneName] = {};
const gene = annotationsPerGene[geneName];
gene[annotationKey] = annotation;
annotationsPerGene[geneName][annotationKey] = annotation;
})

const nextColor = nextColorGenerator();
Expand Down

0 comments on commit a4bbe35

Please sign in to comment.