Skip to content

Commit 5603101

Browse files
committed
🐛 enable fetchCommits to recover from error, otherwise it’ll block
1 parent 1f57d42 commit 5603101

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/components/Git/GitGraph/GitGraphTable.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,15 @@ class GitGraphTable extends Component {
122122
onVerticalScroll = (scrollTop) => {
123123
const commits = this.props.commits
124124
this.syncGitGraphScrollTop(scrollTop)
125+
126+
if (this.isFetching) return this.isFetching
125127
const revealedOffset = scrollTop + this.containerDOM.clientHeight
126128
if (revealedOffset > this.state.rowHeight * (commits.length - 20)) {
127129
const size = 30
128130
const page = Math.floor(commits.length / size) + 1
129-
if (this.isFetching) return
130-
this.isFetching = fetchCommits({ size, page }).then(() =>
131-
this.isFetching = false
132-
)
131+
this.isFetching = fetchCommits({ size, page })
132+
.catch(() => true) // don't care error, just let crash and retry
133+
.then(() => this.isFetching = false)
133134
}
134135
}
135136

0 commit comments

Comments
 (0)