From 7cc5521c83ec11f17e03dc3d74f8488d9ef6977d Mon Sep 17 00:00:00 2001 From: Christopher Gurnee Date: Fri, 13 May 2022 16:16:37 +0000 Subject: [PATCH] Fix minor bug in error-handling --- src/pages/thread/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/thread/index.js b/src/pages/thread/index.js index bfc082d..cb5f72f 100644 --- a/src/pages/thread/index.js +++ b/src/pages/thread/index.js @@ -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) } })