Fix minor bug in error-handling

This commit is contained in:
Christopher Gurnee 2022-05-13 16:16:37 +00:00
parent d3fbd86dd3
commit 7cc5521c83

View file

@ -518,7 +518,7 @@ class Thread extends React.Component {
this.props.global.setError(e, e.helpUrl)
if (this.curContig().lastCreated === undefined) {
this.contigs.splice(this.curContigIdx, 1)
if (this.curContigIdx >= this.contigs.length)
if (this.contigs.length && this.curContigIdx >= this.contigs.length)
this.setCurContig(this.contigs.length - 1)
}
})