Skip to content

Commit

Permalink
#4607 - Bugfix (Chain.ts): Correct the definition of individual phosp…
Browse files Browse the repository at this point in the history
…hate and linker in `add(1)` (step 2)
  • Loading branch information
DmitriiP-EPAM committed Jun 13, 2024
1 parent edbc94b commit 7eaa04c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class Chain {
};
if (
monomer instanceof Phosphate &&
this.lastNode instanceof Nucleoside &&
(!this.lastNode || this.lastNode instanceof Nucleoside) &&
(!nextMonomer || isNextMonomerNucleosideOrNucleotideOrPeptide())
) {
this.lastSubChain.add(new MonomerSequenceNode(monomer));
Expand Down Expand Up @@ -117,7 +117,12 @@ export class Chain {
return nodes;
}

public get lastNode() {
public get lastNode():
| EmptySequenceNode
| MonomerSequenceNode
| Nucleoside
| Nucleotide
| undefined {
return this.lastSubChain?.lastNode;
}

Expand Down

0 comments on commit 7eaa04c

Please sign in to comment.