Skip to content

Commit 39a9da4

Browse files
committed
Validate if domains is undefined
1 parent cb605a9 commit 39a9da4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class LollipopPlot extends React.Component {
4141

4242
domains = () => {
4343
const {domains} = this.props
44-
return domains.map((domain, index) => {
44+
return domains ? domains.map((domain, index) => {
4545
const x = this.codonToX(domain.startCodon)
4646
const width = this.codonToX(domain.endCodon) - x
4747
return (
@@ -59,7 +59,7 @@ class LollipopPlot extends React.Component {
5959
spec={domain}
6060
/>
6161
)
62-
})
62+
}) : ''
6363
}
6464

6565
lollipops = () => {

0 commit comments

Comments
 (0)