diff options
author | Brian Cully <bjc@kublai.com> | 2021-02-19 13:35:33 -0500 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2021-02-19 13:35:33 -0500 |
commit | a5629c55b5575a590f9e8c7884c3bd532c3ed063 (patch) | |
tree | 9ba9516071c6b5d1b8da3658b9d27e175d470866 | |
parent | ed96e5c2964d93bd5b43f85577ef4ab7c217fa2d (diff) | |
download | molsim2-a5629c55b5575a590f9e8c7884c3bd532c3ed063.tar.gz molsim2-a5629c55b5575a590f9e8c7884c3bd532c3ed063.zip |
Remove use of flatMap for old Safari.
-rw-r--r-- | genome.mjs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -38,7 +38,9 @@ class Genome { } get nucleotides() { - return this.codons.flatMap(c => c.bases) + return this.codons.reduce((acc, c) => { + return acc.concat(c.bases) + }, []) } get onNucleotideSelectionChanged() { @@ -63,7 +65,7 @@ class Genome { } clone() { - return new Genome(this.codons.flatMap(c => c.bases.map(b => b.value))) + return new Genome(this.nucleotides.map(n => n.value)) } get selectedNucleotide() { |