Skip to content

Commit c7a8412

Browse files
Refactor .length > 0 pattern
Co-authored-by: silverwind <me@silverwind.io>
1 parent 17f351b commit c7a8412

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/components/RepoActionView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const sfc = {
200200
}
201201
202202
// scrolls to the bottom if job is running and the bottom of the logs container is visible
203-
if (!this.run.done && logLines.length > 0 && clientHeight >= logsContainerHeight) {
203+
if (!this.run.done && logLines.length && clientHeight >= logsContainerHeight) {
204204
const newLogsContainerHeight = this.$refs.stepsContainer.getBoundingClientRect().bottom + window.scrollY;
205205
window.scrollTo({top: clientHeight + (newLogsContainerHeight - logsContainerHeight), behavior: 'smooth'});
206206
}

0 commit comments

Comments
 (0)