File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
packages/apollo-shared/src/Checks Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -99,12 +99,10 @@ function getOriginalCodonLocation(
9999 index : number ,
100100) : [ number , number ] | undefined {
101101 // Index 0 is the start codon, so reverse the CDS locations if strand is -1
102- const sortedLocation : CDSLocation = structuredClone ( cdsLocation )
103- if ( strand === - 1 ) {
104- sortedLocation . sort ( ( a , b ) => ( a . min < b . min ? 1 : - 1 ) )
105- } else {
106- sortedLocation . sort ( ( a , b ) => ( a . min < b . min ? - 1 : 1 ) )
107- }
102+ const sortedLocation =
103+ strand === - 1
104+ ? cdsLocation . toSorted ( ( a , b ) => ( a . min < b . min ? 1 : - 1 ) )
105+ : cdsLocation . toSorted ( ( a , b ) => ( a . min < b . min ? - 1 : 1 ) )
108106 let i = 0
109107 let currentStart : number | undefined = undefined
110108 let currentEnd : number | undefined = undefined
You can’t perform that action at this time.
0 commit comments